readonlyDefault property

dynamic readonlyDefault

Returns a read-only default value for a field. (Unlike getField, doesn't create a repeated field.)

Implementation

dynamic get readonlyDefault {
  if (isRepeated) {
    return _emptyList ??= FrozenPbList._([]);
  }
  return makeDefault();
}