navigation constant Null safety

MethodChannel const navigation

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.

  • pushRouteInformation, which is called with a map, which contains a location string and a state object, when the operating system instructs the application to open a particular page. These parameters are stored under the key location and state in the map.

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

  • routeUpdated, which is called when current route has changed.

  • routeInformationUpdated, which is called by the Router when the application navigate to a new location.

See also:

Implementation

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