ZdsValueController<T> class

Generic controller that can control a value that can be updated over time.

See the implementation of ZdsDateTimePicker to see how this can be used.

Constructors

ZdsValueController({T? value})
Creates a controller for T.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updateListener ↔ (void Function(T? newValue)?)
Should be used by the state to listen for updates from the calling widget.
getter/setter pair
value ↔ T?
Gets the current value of T.
getter/setter pair

Methods

addListener(void listener(T? newValue)) → void
Adds a listener to a list of listeners.
dispose() → void
Discards any active listeners. After this is called the object will not be in a usable state.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners(T? value) → void
Should be used by the state to send updates to the calling widget.
removeListener(void listener(T? newValue)) → void
Removes a single listener.
toString() String
A string representation of this object.
inherited

Operators

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