pushAndRemoveUntil<T extends Object?> method

Future<T?> pushAndRemoveUntil<T extends Object?>({
  1. bool maintainState = true,
  2. bool fullscreenDialog = false,
  3. RoutePushStyle pushStyle = RoutePushStyle.material,
  4. RouteSettings? settings,
  5. RoutePredicate? predicate,
})

Implementation

Future<T?> pushAndRemoveUntil<T extends Object?>(
        {bool maintainState = true,
        bool fullscreenDialog = false,
        RoutePushStyle pushStyle = RoutePushStyle.material,
        RouteSettings? settings,
        RoutePredicate? predicate}) =>
    GlobalOptions().globalNavigatorKey.currentState!.pushAndRemoveUntil(
        buildPageRoute(
            settings: settings,
            maintainState: maintainState,
            fullscreenDialog: fullscreenDialog,
            pushStyle: pushStyle),
        predicate ?? (_) => false);