1. @override
void addError(errorEvent, [ StackTrace stackTrace ])

Adds an error to the sink.

Must not be called on a closed sink.

Source

@override
void addError(errorEvent, [StackTrace stackTrace]) {
  _sendPort.send({"t": "error", "e": errorEvent});
}