navigate method
Pops until given route
, if it already exists in stack
otherwise adds it to the stack (good for web Apps and to avoid duplicate entries).
if onFailure
callback is provided, navigation errors will be passed to it
otherwise they'll be thrown
Implementation
Future<dynamic> navigate(PageRouteInfo route, {OnNavigationFailure? onFailure}) async {
return _findScope(route)._navigate(route, onFailure: onFailure);
}