SavedStateMachine

abstract class SavedStateMachine<S : State, A : Action, E : Effect> @MainThread constructor(savedStateHandle: SavedStateHandle, key: String, initialState: S, graph: Graph<S, A, E>, effectHandle: EffectHandle<S, A, E>, fallbackHandle: FallbackHandle<S, A, E>? = null, logger: Logger = NoopLogger, context: CoroutineContext = EmptyCoroutineContext, initializer: (S) -> MutableStateFlow<S> = { s -> savedStateHandle.getMutableStateFlow(key, s) }) : StateMachine<S, A, E>

A StateMachine that saves its state to SavedStateHandle

Constructors

Link copied to clipboard
constructor(savedStateHandle: SavedStateHandle, key: String, initialState: S, graph: Graph<S, A, E>, effectHandle: EffectHandle<S, A, E>, fallbackHandle: FallbackHandle<S, A, E>? = null, logger: Logger = NoopLogger, context: CoroutineContext = EmptyCoroutineContext, initializer: (S) -> MutableStateFlow<S> = { s -> savedStateHandle.getMutableStateFlow(key, s) })

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val graph: Graph<S, A, E>
Link copied to clipboard
Link copied to clipboard
val scope: CoroutineScope
Link copied to clipboard
val state: StateFlow<S>

Functions

Link copied to clipboard
fun dispatch(action: A)