Open
Description
In current Uri
constructor, parameter queryParameters
accepts a Map with value type String
or Iterable<String>
. It targets two scenario:
foo=1&bar=true
foo=1&foo=2
However, many backends also support nested structures like
name[first]=Tom&name[last]=Hanks&gender=male
which will be translated (in backend) to
{
"name": {
"first": "Tom",
"last": "Hanks"
},
"gender": "male"
}
It would be really handy if we can just pass in
Uri(queryParameters: { 'name': {'first': 'Tom', 'last': 'Hanks'}, 'gender': 'male'})
especially when the Map<String, dynamic>
is constructed from somewhere else.