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

FourStateListener<B extends BlocBase<FourStates<T>>, T>({
  1. SuccessListener<T>? succeedListener,
  2. Widget? child,
  3. InitialListener? initialListener,
  4. LoadingListener? loadingListener,
  5. FailureListener? failureListener,
  6. B? bloc,
  7. BlocListenerCondition<FourStates<T>>? listenWhen,
  8. Key? key,
})

Implementation

FourStateListener({
  SuccessListener<T>? succeedListener,
  Widget? child,
  InitialListener? initialListener,
  LoadingListener? loadingListener,
  FailureListener? failureListener,
  B? bloc,
  BlocListenerCondition<FourStates<T>>? listenWhen,
  super.key,
}) : super(
        bloc: bloc,
        listenWhen: listenWhen,
        listener: (context, state) => state.mayBeMap(
          orElse: () => null,
          initialState: initialListener,
          loadingState: loadingListener,
          succeedState: succeedListener,
          failedState: failureListener,
        ),
        child: child,
      );