urlEncodeQueryMap static method

String urlEncodeQueryMap(
  1. Map<String, dynamic> map, [
  2. ListFormat listFormat = ListFormat.multi
])

Deep encode the Map<String, dynamic> to a query parameter string.

Implementation

static String urlEncodeQueryMap(
  Map<String, dynamic> map, [
  ListFormat listFormat = ListFormat.multi,
]) {
  return encodeMap(
    map,
    (key, value) {
      if (value == null) {
        return key;
      }
      return '$key=$value';
    },
    listFormat: listFormat,
    isQuery: true,
  );
}