ViewModelInstanceObservableValueMixin<T> mixin
A mixin that implements the ViewModelInstanceObservableValue interface and provides the basic functionality for handling listeners (observables) and notifying them of changes. This allows users to observe changes to the underlying Rive property value.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
listeners
↔ List<
void Function(T value)> -
getter/setter pair
- numberOfListeners → int
-
The number of listeners attached to the property.
This is useful for testing purposes.
no setteroverride
- rootViewModelInstance → ViewModelInstance
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value ↔ T
-
Gets the value of the property
getter/setter pairoverride
Methods
-
addListener(
void callback(T value)) → void -
Adds a listener/callback that will be called when the property value
changes
override
-
clearListeners(
) → void -
Clears all listeners from the property
override
-
dispose(
) → void -
Disposes of the property. This removes all listeners and cleans up all
underlying resources.
inherited
-
handleListeners(
) → void - Handles all listeners attached to the property.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
void callback(T value)) → void -
Removes a listener/callback from the property
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited