pushReplacement<T extends Object?, TO extends Object?> method
Future<T?>
pushReplacement<T extends Object?, TO extends Object?>(
- Widget child, {
- QuickTransition? transitions,
- TO? result,
A method that pushes a new route to the Navigator with the given child widget and transition type, and replaces the current route with the new one. It also returns an optional result to the previous route.
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?> pushReplacement<T extends Object?, TO extends Object?>(
Widget child,
{QuickTransition? transitions,
TO? result}) {
return Navigator.of(this).pushReplacement<T, TO>(
QuickRouter.builder(child, transitions),
result: result);
}