onRiveInit method
void
onRiveInit(
- Artboard p1,
- List<String>? stateMachines
)
Implementation
void onRiveInit(Artboard p1, List<String>? stateMachines) {
//loop used for initialize double and bool values from state machines to the map which used for change value on widget event trigger
/// Instance a [StateMachineController] from an [artboard] with the given
/// [stateMachineName]. Returns the [StateMachineController] or null if no
/// [StateMachine] with [stateMachineName] is found.
/// Artboards are the foundation of your composition across both design and animate mode.
/// They act as the root of every hierarchy and allow you to define the dimensions and background color of a scene.
/// You can create an infinite amount of artboards on the Stage, but each Rive file has at least one artboard.
for (var value in stateMachines!) {
final stateController = StateMachineController.fromArtboard(p1, value);
p1.addController(stateController!);
initialiseDoubleInputs(stateController);
initialiseBoolInputs(stateController);
}
}