splitQueryString static method
Implementation
static Map<String, String> splitQueryString(
String query,
) {
return query.split("&").fold({}, (map, element) {
final index = element.indexOf("=");
if (index == -1) {
if (element != "") {
map[element] = "";
}
} else if (index != 0) {
final key = element.substring(0, index);
final value = element.substring(index + 1);
map[key] = value;
}
return map;
});
}