FourStateBuilder<B extends BlocBase<FourStates<T> > , T> constructor
FourStateBuilder<B extends BlocBase<FourStates<T> > , T> ({
- required SuccessBuilder<
T> succeedBuilder, - InitialBuilder? initialBuilder,
- LoadingBuilder? loadingBuilder,
- FailureBuilder? failureBuilder,
- B? bloc,
- BlocBuilderCondition<
FourStates< ? buildWhen,T> > - Key? key,
Implementation
FourStateBuilder({
required SuccessBuilder<T> succeedBuilder,
InitialBuilder? initialBuilder,
LoadingBuilder? loadingBuilder,
FailureBuilder? failureBuilder,
B? bloc,
BlocBuilderCondition<FourStates<T>>? buildWhen,
super.key,
}) : super(
bloc: bloc,
buildWhen: buildWhen,
builder: (context, state) => state.map(
initialState: initialBuilder ??
BlocEaseStateWidgetsProvider.of(context)
.initialStateBuilder,
loadingState: loadingBuilder ??
BlocEaseStateWidgetsProvider.of(context)
.loadingStateBuilder,
failedState: failureBuilder ??
BlocEaseStateWidgetsProvider.of(context)
.failureStateBuilder,
succeedState: succeedBuilder,
));