encodeQueryParameters function

String encodeQueryParameters(
  1. Map<String, String> params
)

Implementation

String encodeQueryParameters(Map<String, String> params) {
  try {
    return params.entries
        .map((e) =>
            "${Uri.encodeComponent(e.key)}=${Uri.encodeComponent(e.value)}")
        .join("&");
  } catch (e) {
    return "";
  }
}