flutter_bloc_arch library


BaseBloc<E extends BlocEvent, S extends BlocState>
A base bloc that extends the Bloc class for providing additional functionality. When the bloc is created, and InitializeEvent is dispatched. 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
Base bloc event All events must inherit from BlocEvent
BlocState All states must inherit from BlocState
Component<B extends BaseBloc<BlocEvent, BlocState>>
Component A user interface 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<BlocEvent, BlocState>>
ComponentView 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<BlocEvent, BlocState>, S extends BlocState, L extends StateLoading, E extends StateError>
StateBuilder Built upon the famous 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
StateInitial The initial state of any bloc that extends BaseBloc
StateInitializationError Emitted when there is an issue with initializing the bloc. It contains the error message, exception and stacktrace This state is implemented with StateError so that it can be used as an error state with the StateBuilder
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 is implemented with StateLoading so that it can be used as a loading state with the StateBuilder


StateError Each state that needs tto allow error functionality to be used with the [StateBuilder[ must be implemented with StateError
StateLoading Each state that needs to allow loading functionality to be used with the StateBuilder must be implemented with StateLoading