//Android/br.com.arch.toolkit.android.statemachine/StateMachine/state
[android]
inline fun state(key: Int, stateConfig: STATE.() -> Unit): StateMachine<STATE>
Adds a new state to the StateMachine using a DSL-like syntax.
android
| Â | Â |
|---|---|
| key | The unique key for the state. |
| stateConfig | A lambda to configure the new state instance. |
| Â |
|---|
| StateMachine.addState |
| Â | Â |
|---|---|
| IllegalStateException | If the machine is already started or the key is negative. |