throwIfReadOnly method

void throwIfReadOnly()

Implementation

void throwIfReadOnly() {
  if (isReadOnly()) {
    throw StateError('The object is read only.');
  }
}