didPopRoute method Null safety

  1. @override
Future<bool> didPopRoute()

Called when the system tells the app to pop the current route. For example, on Android, this is called when the user presses the back button.

Observers are notified in registration order until one returns true. If none return true, the application quits.

Observers are expected to return true if they were able to handle the notification, for example by closing an active dialog box, and false otherwise. The WidgetsApp widget uses this mechanism to notify the Navigator widget that it should pop its current route if possible.

This method exposes the popRoute notification from SystemChannels.navigation.


Future<bool> didPopRoute() => invokeCallback(Future<bool>.value(false));