ProtoGoogleValue.deserialize constructor

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

Implementation

factory ProtoGoogleValue.deserialize(List<int> bytes) {
  final decode = ProtoBufferDecoder.decode(
    bytes: bytes,
    messageConfig: protoConfigStatic(),
  );
  return ProtoGoogleValue(
    nullValue: decode.getEnum<ProtoGoogleNullValue?>(
      1,
      ProtoGoogleNullValue.values,
    ),
    numberValue: decode.getDouble<double?>(2),
    stringValue: decode.getString<String?>(3),
    boolValue: decode.getBool<bool?>(4),
    structValue: decode.messageTo<ProtoGoogleStruct?>(
      5,
      (b) => ProtoGoogleStruct.deserialize(b),
    ),
    listValue: decode.messageTo<ProtoGoogleListValue?>(
      6,
      (b) => ProtoGoogleListValue.deserialize(b),
    ),
  );
}