addError method Null safety

  1. @override
void addError(
  1. Object error,
  2. [StackTrace? stackTrace]
)
override

Adds an error to the sink.

Must not be called on a closed sink.

Implementation

@override
void addError(Object error, [StackTrace? stackTrace]) {
  _checkCanAddEvent();
  onError(error, stackTrace);
}