defaultFrozenMessageModificationHandler function Null safety

void defaultFrozenMessageModificationHandler(
  1. String messageName,
  2. [String? methodName]
)

Implementation

void defaultFrozenMessageModificationHandler(String messageName,
    [String? methodName]) {
  if (methodName != null) {
    throw UnsupportedError(
        'Attempted to call $methodName on a read-only message ($messageName)');
  }
  throw UnsupportedError(
      'Attempted to change a read-only message ($messageName)');
}