isClosed method Null safety

bool isClosed()

Implementation

bool isClosed() {
  return _state == ChannelStates.closed;
}