checkClosed method

void checkClosed()

Checks if the instance is NOT closed, or throws a StateError.

Implementation

void checkClosed() {
  if (_closed) {
    throw StateError("Instance already closed: $this");
  }
}