QueryParams class

Reads and updates the current browser URL query string.

Constructors

QueryParams()
Creates a query parameter helper for the current browser URL.
const

Properties

all Map<String, String>
All query parameters as a single-value map.
no setter
allValues Map<String, List<String>>
All query parameters, preserving repeated values.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear({bool push = false, Object? state}) → void
Removes all query parameters from the current URL.
get(String key) String?
Returns the first value for key, or null when it is absent.
getAll(String key) List<String>
Returns all values for key.
has(String key) bool
Whether the current URL contains key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(String key, {bool push = false, Object? state}) → void
Removes key from the current query string.
set(String key, Object? value, {bool push = false, Object? state}) → void
Sets one query parameter and writes the updated URL to browser history.
toString() String
A string representation of this object.
inherited
update(Map<String, Object?> values, {bool push = false, Object? state}) → void
Updates multiple query parameters and writes the updated URL.

Operators

operator ==(Object other) bool
The equality operator.
inherited