didPushRoute method Null safety

  1. @override
Future<bool> didPushRoute(
  1. String route

Called when the host tells the application to push a new route onto the navigator.

Observers are expected to return true if they were able to handle the notification. Observers are notified in registration order until one returns true.

This method exposes the pushRoute notification from SystemChannels.navigation.


Future<bool> didPushRoute(String route) async {
  _platformReportsNewRouteInformation(RouteInformation(location: route));
  return true;