rememberStateMachine

fun rememberStateMachine(artboard: Artboard, stateMachineName: String? = null): StateMachine

Creates a StateMachine from the given Artboard.

The lifetime of the state machine is managed by this composable. It will delete the state machine when it falls out of scope.

Return

The created StateMachine.

Parameters

artboard

The Artboard to instantiate the state machine from.

stateMachineName

The name of the state machine to load. If null, the default state machine will be loaded.