add method

  1. @override
void add(
  1. T event
)
override

Adds data to the sink.

Must not be called after a call to close.

Implementation

@override
void add(T event) {
  if (_isClosed) {
    throw StateError("Can't add to a closed sink.");
  }

  _events.add(event);
}