go method
void
go(})
Navigate to a location.
Implementation
void go(
String location, {
Map<String, dynamic> pathParams = const <String, dynamic>{},
Map<String, dynamic> queryParams = const <String, dynamic>{},
Map<String, dynamic> params = const <String, dynamic>{},
}) {
Map<String, dynamic> args = <String, dynamic>{};
if (pathParams.isNotEmpty) args.addAll(pathParams);
if (queryParams.isNotEmpty) args.addAll(queryParams);
if (params.isNotEmpty) args.addAll(params);
routing.args = args;
pathParams.forEach((key, value) {
if (location.contains(":$key")) {
location = location.replaceAll(":$key", value.toString());
}
});
queryParams.forEach((key, value) {
location = "$location${location.contains("?") ? "&" : "?"}$key=$value";
});
global().go(location, extra: params);
}