InitialMachine.fromMachine constructor
InitialMachine.fromMachine(
- FutureOr<
TreeStateMachine> create(), { - bool disposeOnExit = true,
- bool forwardMessages = true,
- String? label,
Constructs an InitialMachine that will use the state machine produced by the create
function as the nested state machine.
If disposeOnExit is true (the default), then the nested state machine will be disposed when the
StateTreeBuilder.machineState is exited.
If forwardMessages is true (the default), then the StateTreeBuilder.machineState will
forward any messages that are dispatched to it to the nested state machine.
Implementation
factory InitialMachine.fromMachine(
FutureOr<TreeStateMachine> Function(TransitionContext) create, {
bool disposeOnExit = true,
bool forwardMessages = true,
String? label,
}) {
return InitialMachine._(create, disposeOnExit, forwardMessages, label);
}