mergeFromBuffer method Null safety

void mergeFromBuffer(
  1. List<int> input,
  2. [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]

Merges serialized protocol buffer data into this message.

For each field in input that is already present in this message:

  • If it's a repeated field, this appends to the end of our list.
  • Else, if it's a scalar, this overwrites our field.
  • Else, (it's a non-repeated sub-message), this recursively merges into the existing sub-message.


void mergeFromBuffer(List<int> input,
    [ExtensionRegistry extensionRegistry = ExtensionRegistry.EMPTY]) {
  var codedInput = CodedBufferReader(input);
  final meta = _fieldSet._meta;
  _mergeFromCodedBufferReader(meta, _fieldSet, codedInput, extensionRegistry);