BlocListenerBase<B extends StateStreamable<S>, S> constructor

const BlocListenerBase<B extends StateStreamable<S>, S>({
  1. required BlocWidgetListener<S> listener,
  2. Key? key,
  3. B? bloc,
  4. Widget? child,
  5. 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);