Skip to Content
API ReferencePersistentStore

PersistentStore

live A reactive state store that automatically persists its state across scene reloads using a pluggable IPersistenceAdapter. On first access the previously persisted state is restored; every subsequent Cubit call that changes the state persists the new state.

Constructor

PersistentStore

Creates a persistent store. If the adapter can load a previously persisted state that state is used as the initial value; otherwise is used.

ParameterDescription
fallbackStateThe state to use when no persisted state is available.
adapterThe adapter responsible for saving and loading state. Must not be null.
Last updated on