push<T extends Object?> method

  1. @optionalTypeArgs
Future<T?> push<T extends Object?>(
  1. PageRouteInfo route, {
  2. OnNavigationFailure? onFailure,
})

Adds the corresponding page to given route to the _pages stack

if onFailure callback is provided, navigation errors will be passed to it otherwise they'll be thrown

Implementation

@optionalTypeArgs
Future<T?> push<T extends Object?>(PageRouteInfo route, {OnNavigationFailure? onFailure}) async {
  return _findStackScope(route)._push<T>(route, onFailure: onFailure);
}