FourStateBuilder<B extends BlocBase<FourStates<T>>, T> constructor

FourStateBuilder<B extends BlocBase<FourStates<T>>, T>({
  1. required SuccessBuilder<T> succeedBuilder,
  2. InitialBuilder? initialBuilder,
  3. LoadingBuilder? loadingBuilder,
  4. FailureBuilder? failureBuilder,
  5. B? bloc,
  6. BlocBuilderCondition<FourStates<T>>? buildWhen,
  7. 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,
              ));