$location static method

String $location(
  1. String path, {
  2. Map<String, dynamic>? queryParams,
})

A helper function used by generated code.

Should not be used directly.

Implementation

static String $location(String path, {Map<String, dynamic>? queryParams}) =>
    Uri.parse(path)
        .replace(
          queryParameters:
              // Avoid `?` in generated location if `queryParams` is empty
              queryParams?.isNotEmpty ?? false ? queryParams : null,
        )
        .toString();