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