ControlArgs class

Stores data as arguments based on key - value pairs.

Implemented types
Implementers
Available Extensions

Constructors

ControlArgs(Map _args)
const
ControlArgs.of([dynamic args])
factory

Properties

data Map
Returns currently stored data. Mostly used by framework. Do not modify this data directly ! Consider using ControlArgs.set, ControlArgs.get, ControlArgs.add functions or [] operators.
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

add<T>({dynamic key, required dynamic value}) → void
Adds value to data store under given key. ControlFactory.keyOf is used to determine store key.
clear() → void
Clears whole data store.
combine(ControlArgs args) → void
Combines this store with given args.
containsKey(dynamic key) bool
Whether this args contains the given key.
dispose() → void
Used to clear and dispose object. After this method call is object typically unusable and ready for GC. Can be called multiple times!
override
get<T>({dynamic key, T? defaultValue}) → T?
Returns object of given key or defaultValue.
getAll<T>({Predicate? test}) List<T>
Returns all items for given test.
getWithFactory<T>({dynamic key, T defaultValue()?}) → T?
Returns object of given key or initialize defaultValue and stores that value to args store.
merge(ControlArgs args) ControlArgs
Combines this store with given args. Returns new ControlArgs that contains both args.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pop<T>({dynamic key}) → T?
Removes and returns item by Type or key.
printDebugStore() → void
remove<T>({dynamic key}) → T?
Removes item by Type or key.
removeAll<T>({Predicate? test}) → void
Removes all items for given test.
set(dynamic args) → void
Parses input data and stores them as key: value pair. Can store any type of data - Map, Iterable, Objects and more.. Map - is directly added to data store. Iterable - is parsed and data are stored under their Type. Object - is stored under his Type. Other ControlArgs is combined.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](dynamic key) → dynamic
Returns object of given key or null.
operator []=(dynamic key, dynamic value) → void
Sets value directly to store with given key. Consider using ControlArgs.set or ControlArgs.add to prevent use of misleading key.