urlWithParams method

Uri urlWithParams({
  1. Map<String, String?> parameters = const {},
})

Implementation

Uri urlWithParams({Map<String, String?> parameters = const {}}) {
  if (!templated) {
    return Uri.parse(href);
  }
  String expandedHref = UriTemplate(href).expand(
      parameters.map((key, dynamic value) => MapEntry(key, value ?? "")));
  return Uri.parse(expandedHref);
}