RxBlocListenerBase<B extends RxBlocTypeBase, S> constructor

const RxBlocListenerBase<B extends RxBlocTypeBase, S>({
  1. required RxBlocWidgetListener<S> listener,
  2. required Stream<S> state(
    1. B
    ),
  3. Key? key,
  4. B? bloc,
  5. Widget? child,
  6. RxBlocListenerCondition<S>? condition,
})

Base class for widgets that listen to state changes in a specified bloc.

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