navigation constant

MethodChannel const navigation = const MethodChannel('flutter/navigation', const JSONMethodCodec())

A JSON MethodChannel for navigation.

The following incoming methods are defined for this channel (registered using MethodChannel.setMethodCallHandler):

  • popRoute, which is called when the system wants the current route to be removed (e.g. if the user hits a system-level back button).

  • pushRoute, which is called with a single string argument when the operating system instructs the application to open a particular page.

See also:

The following methods are used for the opposite direction data flow. The framework notifies the engine about the route changes.

  • routePushed, which is called when a route is pushed. (e.g. A modal replaces the entire screen.)

  • routePopped, which is called when a route is popped. (e.g. A dialog, such as time picker is closed.)

  • routeReplaced, which is called when a route is replaced.

See also:


static const MethodChannel navigation = MethodChannel(