FieldInfo<T>.repeated constructor Null safety

FieldInfo<T>.repeated(
  1. String name,
  2. int tagNumber,
  3. int? index,
  4. int type,
  5. CheckFunc<T>? check,
  6. CreateBuilderFunc? subBuilder,
  7. {ValueOfFunc? valueOf,
  8. List<ProtobufEnum>? enumValues,
  9. ProtobufEnum? defaultEnumValue,
  10. String? protoName}
)

Implementation

FieldInfo.repeated(this.name, this.tagNumber, this.index, this.type,
    this.check, this.subBuilder,
    {this.valueOf, this.enumValues, this.defaultEnumValue, String? protoName})
    : makeDefault = (() => PbList<T>(check: check!)),
      protoName = protoName ?? _unCamelCase(name) {
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(tagNumber, 'tagNumber');
  assert(_isRepeated(type));
  assert(check != null);
  assert(!_isEnum(type) || valueOf != null);
}