addListener method

void addListener(
  1. ErrListener<T> listener
)

Registers a listener, which is a function to be called when new error information is set by ErrNotifier.set(), ErrNotifier.log(), LoggingErrNotifier.set() or LoggingErrNotifier.log().

This method must not be called after dispose() has been called.

Implementation

void addListener(ErrListener<T> listener) {
  assert(_debugAssertNotDisposed());
  _notifier.addListener(listener);
}