addError method
As with add, but for adding errors.
Implementation
@override
void addError(Object o, [StackTrace? st]) {
_lastAddedValue = ValueOrException.exc(o, st);
if (!_sync && _controller.hasListener) {
if (_controllerAddScheduled) return;
_controllerAddScheduled = true;
scheduleMicrotask(_controllerAddMicrotask);
} else {
_controllerAddMicrotask();
}
}