pushReplacementNamed<T extends Object?> method

Future<T?> pushReplacementNamed<T extends Object?>(
  1. String name, {
  2. Map<String, String> pathParameters = const <String, String>{},
  3. Map<String, dynamic> queryParameters = const <String, dynamic>{},
  4. Object? extra,
})

Replaces the top-most page of the page stack with the named route w/ optional parameters, e.g. name='person', pathParameters={'fid': 'f2', 'pid': 'p1'}.

Implementation

Future<T?> pushReplacementNamed<T extends Object?>(
  String name, {
  Map<String, String> pathParameters = const <String, String>{},
  Map<String, dynamic> queryParameters = const <String, dynamic>{},
  Object? extra,
}) =>
    App.goRouter?.pushReplacementNamed<T>(
      name,
      pathParameters: pathParameters,
      queryParameters: queryParameters,
      extra: extra,
    ) ??
    Future.value();