Query class

Query utility.

This utility is used to manipulate the query string of the URL.

Example:

import 'package:kitawi/ui.dart';

void main() {
 Query.onChange((query) {
  print(query);
});

Query.set({
 'name': 'John Doe',
});

Query.remove('name');

Query.clear();
}

Constructors

Query()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

clear() → void
Clear the query string.
get(String key) String?
Get the value of a query parameter.
getAll() Map<String, String>
Get the query string as a map.
onChange(dynamic callback(Map<String, String>), {bool? immediate = false, bool? runOnce = false}) → void
Listen to changes in the query string.
remove(String key) → void
Remove a query parameter.
set(Map<String, String> query) → void
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.