buildSourcesUrl static method

String buildSourcesUrl(
  1. String path,
  2. String? category,
  3. String? language,
  4. String? country,
)

Implementation

static String buildSourcesUrl(
  String path,
  String? category,
  String? language,
  String? country,
) {
  final Uri url = Uri.parse("$path?x=y");
  final queryParams = <String, String>{};
  if (category != null) queryParams["category"] = Util.sanitize(category);
  if (language != null) queryParams["language"] = Util.sanitize(language);
  if (country != null) queryParams["country"] = Util.sanitize(country);
  return url.replace(queryParameters: queryParams).toString();
}