listenOn<S extends BaseState> method

void listenOn<S extends BaseState>({
  1. BlocListenerFunction? func,
})

Implementation

void listenOn<S extends BaseState>({BlocListenerFunction? func}) {
  func ??= defaultListener;
  if (func != null) {
    _listeners[S.toString()] = func;
  }
}