MapFieldInfo<K, V> constructor Null safety

MapFieldInfo<K, V>(
  1. String name,
  2. int tagNumber,
  3. int index,
  4. int type,
  5. int? keyFieldType,
  6. int? valueFieldType,
  7. BuilderInfo mapEntryBuilderInfo,
  8. CreateBuilderFunc? valueCreator,
  9. {ProtobufEnum? defaultEnumValue,
  10. String? protoName}
)

Implementation

MapFieldInfo(
    String name,
    int tagNumber,
    int index,
    int type,
    this.keyFieldType,
    this.valueFieldType,
    this.mapEntryBuilderInfo,
    this.valueCreator,
    {ProtobufEnum? defaultEnumValue,
    String? protoName})
    : super(name, tagNumber, index, type,
          defaultOrMaker: () =>
              PbMap<K, V>(keyFieldType, valueFieldType, mapEntryBuilderInfo),
          defaultEnumValue: defaultEnumValue,
          protoName: protoName) {
  ArgumentError.checkNotNull(name, 'name');
  ArgumentError.checkNotNull(tagNumber, 'tagNumber');
  assert(_isMapField(type));
  assert(!_isEnum(type) || valueOf != null);
}