ProtoGoogleStruct.deserialize constructor

ProtoGoogleStruct.deserialize(
  1. List<int> bytes
)

Implementation

factory ProtoGoogleStruct.deserialize(List<int> bytes) {
  final decode = ProtoBufferDecoder.decode(
    bytes: bytes,
    messageConfig: protoConfigStatic(),
  );
  return ProtoGoogleStruct(
    fields: decode.getMapField<String, ProtoGoogleValue>(
      fieldNumber: 1,
      keyMapper: (k) => k.toString(),
      valueMapper: (v) => ProtoGoogleValue.deserialize((v as List<int>)),
    ),
  );
}