ViewModelInstance class abstract interface

An instance of a Rive ViewModel that can be used to access and modify properties in the view model.

Docs: https://rive.app/docs/runtimes/data-binding

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDisposed → bool
Indicates whether the view model instance has been disposed.
no setter
name → String
The name of the view model instance
no setter
numberOfAdvanceRequestListeners → int
The number of registered advance request listeners.
no setterinherited
numberOfCallbacks → int
The number of properties that have listeners attached to them. This is useful for testing purposes.
no setterinherited
properties → List<ViewModelProperty>
A list of ViewModelProperty that makes up the view model instance
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAdvanceRequestListener(VoidCallback callback) → void
Adds a listener to be notified when advance is requested.
inherited
artboard(String path) → ViewModelInstanceArtboard?
Access a property instance of type ViewModelInstanceArtboard belonging to the view model instance or to a nested view model instance.
boolean(String path) → ViewModelInstanceBoolean?
Access a property instance of type ViewModelInstanceBoolean belonging to the view model instance or to a nested view model instance.
color(String path) → ViewModelInstanceColor?
Access a property instance of type ViewModelInstanceColor belonging to the view model instance or to a nested view model instance.
dispose() → void
Disposes of the view model instance. This removes all listeners/callbacks and cleans up all underlying resources.
enumerator(String path) → ViewModelInstanceEnum?
Access a property instance of type ViewModelInstanceEnum belonging to the view model instance or to a nested view model instance.
font(String path) → ViewModelInstanceAssetFont?
Access a property instance of type ViewModelInstanceAssetFont belonging to the view model instance or to a nested view model instance.
handleCallbacks() → void
Processes all callbacks for properties with attached listeners.
inherited
image(String path) → ViewModelInstanceAssetImage?
Access a property instance of type ViewModelInstanceAssetImage belonging to the view model instance or to a nested view model instance.
list(String path) → ViewModelInstanceList?
Access a property instance of type ViewModelInstanceList belonging to the view model instance or to a nested view model instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
number(String path) → ViewModelInstanceNumber?
Access a property instance of type ViewModelInstanceNumber belonging to the view model instance or to a nested view model instance.
removeAdvanceRequestListener(VoidCallback callback) → void
Removes a previously added advance request listener.
inherited
removeAllAdvanceRequestListeners() → void
Removes all advance request listeners.
inherited
requestAdvance() → void
Notifies all listeners that an advance/repaint is needed.
inherited
string(String path) → ViewModelInstanceString?
Access a property instance of type ViewModelInstanceString belonging to the view model instance or to a nested view model instance.
toString() → String
A string representation of this object.
inherited
trigger(String path) → ViewModelInstanceTrigger?
Access a property instance of type ViewModelInstanceTrigger belonging to the view model instance or to a nested view model instance.
viewModel(String path) → ViewModelInstance?
Access a property instance of type ViewModelInstance belonging to the view model instance or to a nested view model instance.

Operators

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