BlocSideEffectListenerBase<B extends SideEffectProvider<C>, C> constructor

const BlocSideEffectListenerBase<B extends SideEffectProvider<C>, C>({
  1. Key? key,
  2. required BlocWidgetSideEffectListener<C> listener,
  3. B? bloc,
  4. Widget? child,
})

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 BlocSideEffectListenerBase({
  Key? key,
  required this.listener,
  this.bloc,
  this.child,
}) : super(key: key, child: child);