pushReplacementNamed<T> method
Replaces the top-most page of the page stack with the named route w/
optional parameters, e.g. name='person', params={'fid': 'f2', 'pid': 'p1'}
.
See also:
Implementation
Future<T?> pushReplacementNamed<T>(
String name, {
Map<String, String> pathParams = const <String, String>{},
Map<String, dynamic> queryParams = const <String, dynamic>{},
Object? extra,
}) {
Map<String, dynamic> args = <String, dynamic>{};
if (pathParams.isNotEmpty) args.addAll(pathParams);
if (queryParams.isNotEmpty) args.addAll(queryParams);
if (extra != null && extra is Map) {
args.addAll(extra as Map<String, dynamic>);
}
routing.args = args;
return global().pushReplacementNamed<T>(
name,
pathParameters: pathParams,
queryParameters: queryParams,
extra: extra,
);
}