StateMachine
StateMachine copied to clipboard
Can you publish to the `toState` property of `Transition` class?
Because I want to determine the action according to the toState
state.
If you can I can create an extension function then I can write to flow.
ex)
If toState
property is publish and you define below extension
fun State.navigate() {
when(this) {
Solid -> foo
}
}
we can write the following:
stateMachine.transition(<SomeEvent>).toState.navigate()
Now we can only write the following:
stateMachine.run {
transition(it)
state.navigate()
}
Thank you.