BlocListenerBase<B extends StateStreamable<S> , S> constructor
const
BlocListenerBase<B extends StateStreamable<S> , S> ({
- required BlocWidgetListener<
S> listener, - Key? key,
- B? bloc,
- Widget? child,
- BlocListenerCondition<
S> ? listenWhen,
Base class for widgets that listen to state changes in a specified bloc.
A BlocListenerBase is stateful and maintains the state subscription. The type of the state and what happens with each state change is defined by sub-classes.
Implementation
const BlocListenerBase({
required this.listener,
Key? key,
this.bloc,
this.child,
this.listenWhen,
}) : super(key: key, child: child);