urlEncodeMap static method
Recursively encode the Map<String, dynamic> to percent-encoding. Generally used with the "application/x-www-form-urlencoded" content-type.
Implementation
static String urlEncodeMap(
Map<String, dynamic> map, [
ListFormat listFormat = ListFormat.multi,
]) {
return encodeMap(
map,
(key, value) {
if (value == null) {
return key;
}
return '$key=${Uri.encodeQueryComponent(value.toString())}';
},
listFormat: listFormat,
);
}