StateMachineController class
An AnimationController which controls a StateMachine and provides access to the inputs of the StateMachine.
- Inheritance
-
- Object
- RiveAnimationController<
CoreContext> - StateMachineController
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
-
hitNestedArtboards
↔ List<
NestedArtboard> -
getter/setter pairinherited
-
hitShapes
↔ List<
_HitShape> -
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
- onStateChange → OnStateChange?
-
Optional callback for state changes
finalinherited
- 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
-
advanceInputs(
) → void -
apply(
CoreContext core, double elapsedSeconds) → void -
Apply animation to objects registered in
core
. Note that acore
context is specified as animations can be applied to instances.inherited -
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
-
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) → void -
inherited
-
pointerEnter(
Vec2D position) → void -
inherited
-
pointerExit(
Vec2D position) → void -
inherited
-
pointerMove(
Vec2D position) → void -
inherited
-
pointerUp(
Vec2D position) → void -
inherited
-
removeEventListener(
OnEvent callback) → void -
Removes listener from this controller.
inherited
-
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
-
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 givenstateMachineName
. Returns the StateMachineController or null if no StateMachine withstateMachineName
is found.