bloc_component library

Classes

BaseBloc
A base bloc that extends the Bloc class for providing additional functionality. When the bloc is created, InitializeEvent is dispatched if the initial state is StateUninitialized. If the state is not StateUninitialized, then InitializeEvent won't be dispatched and the initialize method won't be called. In order to do some initializations, you can override the initialize method If you need to yield some state upon initialization, then you can use the onInitialized method
BlocEvent
Bloc base event All events must inherit from BlocEvent
BlocState
Bloc base state All states must inherit from BlocState
Component<B extends BaseBloc>
A UI component that extends a StatelessWidget. A Component has its own bloc that extends BaseBloc You need to tell the component how to create the bloc by overriding the createBloc method and how to build the component view by overriding the createView method
ComponentView<B extends BaseBloc>
Responsible for building the view of a Component It provides direct access to the bloc built by the Component
InitializeEvent
An event for initializing the blocs that inherit from BaseBloc This event is dispatched when the bloc is created
StateBuilder<B extends BaseBloc, S extends BlocState>
Built upon BlocBuilder class Can be used for building a widget on a specific bloc state [...]
StateBuilderConfig
Used for configuring default behavior on specific states for all StateBuilders
StateError
Bloc error state Each state that needs to allow error functionality to be used with the StateBuilder must extend StateError
StateInitializationError
This state is emitted when there is an error with initializing the bloc
StateInitialized
A state that indicates that the bloc is initialized
StateInitializing
A state that indicates that the bloc is being initialized. Allows reporting progress of initializing. This state extends StateLoading so that the StateBuilder can handle it correctly as a loading state
StateLoading
Loading state. Used when the bloc is performing some action that takes time.
StateUninitialized
The initial state of any bloc that extends BaseBloc When the initial state is StateUninitialized, then the first event that will be dispatched is the InitializeEvent which will call BaseBloc.initialize