error method
Pass an error to the observer.
Implementation
@override
void error(Object error, StackTrace stackTrace) {
DisposedError.checkNotDisposed(this);
if (_hasStopped) {
return;
}
_hasStopped = true;
_hasError = true;
_error = error;
_stackTrace = stackTrace;
for (final observer in [..._observers]) {
observer.error(error, stackTrace);
}
_observers.clear();
}