send method

void send(
  1. T value, {
  2. String message = 'Channel is closed.',
})

このChannelへ値を送信する.

Implementation

void send(
  T value, {
  String message = 'Channel is closed.',
}) {
  if (_notify.isClosed) {
    throw CancellationException(message);
  }
  _queue.add(value);
  _notify.notify();
}