addMapField<K, V> method Null safety

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

Implementation

void addMapField<K, V>(
    int tagNumber,
    String name,
    int? keyFieldType,
    int? valueFieldType,
    BuilderInfo mapEntryBuilderInfo,
    CreateBuilderFunc? valueCreator,
    {ProtobufEnum? defaultEnumValue,
    String? protoName}) {
  var index = byIndex.length;
  _addField(MapFieldInfo<K, V>(name, tagNumber, index, PbFieldType.M,
      keyFieldType, valueFieldType, mapEntryBuilderInfo, valueCreator,
      defaultEnumValue: defaultEnumValue, protoName: protoName));
}