queryParameters property

Map<String, String> get queryParameters

The URI query split into a map according to the rules specified for FORM post in the HTML 4.01 specification section 17.13.4.

Each key and value in the resulting map has been decoded. If there is no query, the empty map is returned.

Keys in the query string that have no value are mapped to the empty string. If a key occurs more than once in the query string, it is mapped to an arbitrary choice of possible value. The queryParametersAll getter can provide a map that maps keys to all of their values.

Example:

final uri =
    Uri.parse('https://example.com/api/fetch?limit=10,20,30&max=100');
print(jsonEncode(uri.queryParameters));
// {"limit":"10,20,30","max":"100"}

The map is unmodifiable.

Implementation

Map<String, String> get queryParameters;