checkReadOnly method

void checkReadOnly()

Implementation

void checkReadOnly() {
  if (_isReadOnly) {
    throw Exception(
      'The service collection cannot be modified because it is read-only.',
    );
  }
}