bloc
fun <State : Any, Action : Any, SideEffect : Any> bloc(context: BlocContext, initialValue: State, block: BlocBuilder<State, Action, SideEffect, State>.() -> Unit = {}): Bloc<State, Action, SideEffect>
Creates a Bloc instance using a BlocBuilder.
Proposal == State
initialValue instead of BlocState as argument
bloc<State, Action, SideEffect>(context, initialValue) {
...
}
Content copied to clipboard
fun <State : Any, Action : Any> bloc(context: BlocContext, blocState: BlocState<State, State>, block: BlocBuilder<State, Action, Unit, State>.() -> Unit = {}): Bloc<State, Action, Unit>
Creates a Bloc instance using a BlocBuilder.
Proposal == State
no side effects
bloc<State, Action>(context, blocState) {
...
}
Content copied to clipboard
fun <State : Any, Action : Any> bloc(context: BlocContext, initialValue: State, block: BlocBuilder<State, Action, Unit, State>.() -> Unit = {}): Bloc<State, Action, Unit>
Creates a Bloc instance using a BlocBuilder.
initialValue instead of BlocState as argument
Proposal == State
no side effects
bloc<State, Action>(context, blocState) {
...
}
Content copied to clipboard