Transition

data class Transition<E : Any, S : Any>(val currentState: S, val event: E, val nextState: S)

A Change that also carries the event that triggered it.

Only produced when Bloc.emit is called synchronously inside an event handler (i.e. without suspending first). Async emissions reach Bloc.onChange but not Bloc.onTransition.

Forwarded to BlocObserver.onTransition and the Bloc's own Bloc.onTransition hook.

Constructors

Link copied to clipboard
constructor(currentState: S, event: E, nextState: S)

Properties

Link copied to clipboard
Link copied to clipboard
val event: E
Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String