popAndPushToCurrentTab<T> method

  1. @override
Future<T?> popAndPushToCurrentTab<T>(
  1. NavRoute<T> route, {
  2. Object? result,
})
inherited

Removes the current route and pushes a new route to the current tab's stack.

The route specifies the route to push, where T is the type of result returned when the route is popped.

Returns a Future that completes with the result of type T or null when the pushed route is removed from the stack.

Implementation

@override
Future<T?> popAndPushToCurrentTab<T>(NavRoute<T> route, {Object? result}) {
  add(NavigationPopAndPushTabRouteEvent(route, result: result));

  return route.popped;
}