Package-level declarations

Types

Link copied to clipboard
abstract class BlocState<out State : Any, in Proposal : Any> : StateStream<State> , Sink<Proposal>

BlocState is the actual keeper of State. a source of asynchronous state data (StateStream) and a Sink for proposals used to potentially alter state.

Link copied to clipboard
abstract class BlocStateBase<State : Any, Proposal : Any>(initialState: State) : BlocState<State, Proposal>

A convenience base class for BlocState implementations.

Link copied to clipboard

This builder creates a BlocState that uses the accept function to process the Bloc's proposal and potentially updates the State.

Functions

Link copied to clipboard

Converts a Bloc to a BlocState.

Link copied to clipboard
@JvmName(name = "blocStateInitialValue")
fun <State : Any> blocState(initialState: State): BlocState<State, State>

Creates a BlocState instance using a SimpleBlocStateBuilder (Proposal == State -> no accept function needed):

@JvmName(name = "blocState")
fun <State : Any, Proposal : Any> blocState(block: BlocStateBuilder<State, Proposal>.() -> Unit): BlocState<State, Proposal>

Creates a BlocState instance using a BlocStateBuilder