goNamed method

void goNamed(
  1. String name, {
  2. Map<String, String> pathParams = const <String, String>{},
  3. Map<String, dynamic> queryParams = const <String, dynamic>{},
  4. Map<String, dynamic> params = const <String, dynamic>{},
})

Navigate to a named route.

Implementation

void goNamed(
  String name, {
  Map<String, String> pathParams = const <String, String>{},
  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;
  global().goNamed(
    name,
    pathParameters: pathParams,
    queryParameters: queryParams,
    extra: params,
  );
}