StateMachineController class

An AnimationController which controls a StateMachine and provides access to the inputs of the StateMachine.

Inheritance

Constructors

StateMachineController(StateMachine stateMachine, {OnStateChange? onStateChange})

Properties

artboard Artboard?
The artboard that this state machine controller is manipulating.
no setterinherited
core ↔ CoreContext
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
hitComponents List<_HitComponent>
getter/setter pairinherited
inputs Iterable<SMIInput>
A list of inputs available in the StateMachine.
no setter
isActive bool
getter/setter pairinherited
isActiveChanged ValueListenable<bool>
no setterinherited
layerControllers List<LayerController>
finalinherited
onInputValueChange ↔ OnInputValueChange?
Optional callback for input value changes
getter/setter pairinherited
onStateChange → OnStateChange?
Optional callback for state changes
finalinherited
reportedEvents List<Event>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stateMachine StateMachine
finalinherited

Methods

addEventListener(OnEvent callback) → void
Adds a Rive event listener to this controller.
inherited
addRuntimeEventListener(OnRuntimeEvent callback) → void
advanceInputs() → void
apply(CoreContext core, double elapsedSeconds) → void
Apply animation to objects registered in core. Note that a core context is specified as animations can be applied to instances.
inherited
applyEvents() → void
dispose() → void
inherited
findInput<T>(String name) SMIInput<T>?
Find an input with a specific backing type and a given name.
findSMI<T>(String name) → T?
Find an input of specific concrete input type, with a given name.
getInputValue(int id) → dynamic
inherited
hasListenerWithTarget(Node target) bool
inherited
hitTest(Vec2D position, {PointerEvent? pointerEvent, ListenerType? hitEvent}) bool
Hit testing. If any listeners were hit, returns true.
inherited
init(CoreContext core) bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onActivate() → void
inherited
onDeactivate() → void
inherited
pointerDown(Vec2D position, PointerDownEvent event) → HitResult
inherited
pointerEnter(Vec2D position) → HitResult
inherited
pointerExit(Vec2D position) → HitResult
inherited
pointerMove(Vec2D position) → HitResult
inherited
pointerUp(Vec2D position) → HitResult
inherited
removeEventListener(OnEvent callback) → void
Removes listener from this controller.
inherited
removeRuntimeEventListener(OnRuntimeEvent callback) → void
reportEvent(Event event) → void
inherited
reportKeyedCallback(int objectId, int propertyKey, double elapsedSeconds) → void
Implementation of interface that reports which time based events have elapsed on a timeline within this state machine.
inherited
reportNestedEvent(Event event, Node source) → void
inherited
setInputValue(int id, dynamic value) → void
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromArtboard(Artboard artboard, String stateMachineName, {OnStateChange? onStateChange}) StateMachineController?
Instance a StateMachineController from an artboard with the given stateMachineName. Returns the StateMachineController or null if no StateMachine with stateMachineName is found.