pushAndRemoveUntil<T extends Object?> method
Future<T?>
pushAndRemoveUntil<T extends Object?>(
- Widget widget, {
- PageRouteOptions options = const PageRouteOptions.material(),
- required RoutePredicate predicate,
Implementation
Future<T?> pushAndRemoveUntil<T extends Object?>(
Widget widget, {
PageRouteOptions options = const PageRouteOptions.material(),
required RoutePredicate predicate,
}) {
assert(FlExtended().navigatorKey.currentState != null,
'Set FlExtended().navigatorKey to one of [MaterialApp CupertinoApp WidgetsApp]');
return FlExtended()
.navigatorKey
.currentState!
.pushAndRemoveUntil<T>(options.buildPageRoute(widget), predicate);
}