set static method
Set the query string. It will append the query string to the URL. It will override the existing query string in case the key already exists.
This method will trigger the onChange
event.
Implementation
static void set(Map<String, String> query) {
final searchParams = window.location.search;
final uri = Uri(
queryParameters: {
...Uri.parse(searchParams).queryParameters,
...query,
},
);
window.history.pushState(null, '', uri.toString());
_controller.add(uri.queryParameters);
}