FourStateListener<B extends BlocBase<FourStates<T> > , T> constructor
FourStateListener<B extends BlocBase<FourStates<T> > , T> ({
- SuccessListener<
T> ? succeedListener, - Widget? child,
- InitialListener? initialListener,
- LoadingListener? loadingListener,
- FailureListener? failureListener,
- B? bloc,
- BlocListenerCondition<
FourStates< ? listenWhen,T> > - 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,
);