NanoVar<T> class

Instances of this class holds a value of type T and it's possible to subscribe to changes to this value.

The value can be both get and set.

Implemented types
Available Extensions

Constructors

NanoVar(T initialValue)
Creates a new NanoVar with a given initialValue.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subscribersCount int
Returns the current number of subscribers.
no setter
value ↔ T
Gets the current value.
getter/setter pairoverride-getter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
subscribe(NanoReadSubscribeCallback<T> callback) → void Function()
Subscribes to changes to the value, which means callback is called each time a change occurs.
override
toString() String
A string representation of this object.
inherited

Operators

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