emit method

void emit(
  1. PintoError error
)

Emits an error.

The listeners will be notified of the error.

Implementation

void emit(PintoError error) {
  _errors.add(error);
  for (final listener in _listeners) {
    listener.call();
  }
}