popAndPush<T extends Object?, TO extends Object?>  method 
      
  
Future<T?> 
popAndPush<T extends Object?, TO extends Object?>( 
    
- PageRouteInfo<Object?> route, {
- TO? result,
- OnNavigationFailure? onFailure,
inherited
    Pop the current route off the navigator and push the given route in its place.
if onFailure callback is provided, navigation errors will be passed to it
otherwise they'll be thrown
Implementation
@optionalTypeArgs
Future<T?> popAndPush<T extends Object?, TO extends Object?>(
  PageRouteInfo route, {
  TO? result,
  OnNavigationFailure? onFailure,
}) {
  final scope = _findStackScope(route);
  scope.pop<TO>(result);
  return scope._push<T>(route, onFailure: onFailure);
}