Package-level declarations
Types
Link copied to clipboard
interface AnyHydratedBloc
Type-erased interface for HydratedBloc operations that need to work without knowledge of the concrete state and event type parameters.
Link copied to clipboard
Link copied to clipboard
object BlocRegistry
A centralised, type-safe registry for StateEmitter instances (both Bloc and Cubit).
Link copied to clipboard
Controls how a new event of the same type is handled while a previous handler is still active or pending.
Link copied to clipboard
abstract class HydratedBloc<S : Any, E : Any>(initialState: S, serializer: KSerializer<S>, storageKeyParam: String? = null, storage: HydratedStorage = HydratedBloc.storage) : Bloc<S, E> , AnyHydratedBloc
A Bloc subclass that automatically persists its state to HydratedStorage on every emit and restores it the next time the Bloc is instantiated.
Link copied to clipboard
interface HydratedStorage
Persistence contract for HydratedBloc.
Link copied to clipboard
Thread-unsafe in-memory HydratedStorage for use in unit tests.
Link copied to clipboard
class SharedPreferencesStorage(context: Context, prefsName: String = "dev.bloc.hydrated") : HydratedStorage
HydratedStorage backed by SharedPreferences.
Link copied to clipboard
Link copied to clipboard