pushReplacement<T extends Object?, TO extends Object?> function

Future<T?> pushReplacement<T extends Object?, TO extends Object?>(
  1. Widget widget, {
  2. PageRouteOptions? options,
  3. TO? result,
})

打开新页面替换当前页面

Implementation

Future<T?> pushReplacement<T extends Object?, TO extends Object?>(Widget widget,
        {PageRouteOptions? options, TO? result}) =>
    widget.pushReplacement<T, TO>(widget,
        options: (options ??= PageRouteOptions(style: FlExtended().pushStyle)),
        result: result);