namedLocation method

String namedLocation(
  1. String name, {
  2. Map<String, String> pathParams = const <String, String>{},
  3. Map<String, dynamic> queryParams = const <String, dynamic>{},
})

Get a location from route name and parameters.

Implementation

String namedLocation(
  String name, {
  Map<String, String> pathParams = const <String, String>{},
  Map<String, dynamic> queryParams = const <String, dynamic>{},
}) {
  Map<String, dynamic> args = <String, dynamic>{};
  if (pathParams.isNotEmpty) args.addAll(pathParams);
  if (queryParams.isNotEmpty) args.addAll(queryParams);
  routing.args = args;
  return global().namedLocation(
    name,
    pathParameters: pathParams,
    queryParameters: queryParams,
  );
}