pushAndRemoveUntil<T extends Object?> method
Future<T?>
pushAndRemoveUntil<T extends Object?>(
- Widget child,
- RoutePredicate predicate, {
- QuickTransition? transitions,
A method that pushes a new route to the Navigator with the given child widget and transition type, and removes all the previous routes until the predicate is satisfied.
Defines the available transition options for animations. Only one transition can be selected at a time.
Available transitions:
- QuickSlide: Quickly slides the content.
- QuickRotate: Rapidly rotates the content.
- QuickScale: Swiftly scales the content.
- QuickSize: Rapidly resizes the content.
- QuickFade: Swiftly fades the content.
The default transition is QuickFade.
Implementation
Future<T?> pushAndRemoveUntil<T extends Object?>(
Widget child,
RoutePredicate predicate, {
QuickTransition? transitions,
}) {
return Navigator.of(this).pushAndRemoveUntil<T>(
QuickRouter.builder(child, transitions), predicate);
}