MetadataValue.fromJson constructor

MetadataValue.fromJson(
  1. Object? j
)

Implementation

factory MetadataValue.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return MetadataValue(
    intValue: switch (json['intValue']) {
      null => null,
      Object $1 => decodeInt64($1),
    },
    floatValue: switch (json['floatValue']) {
      null => null,
      Object $1 => decodeDouble($1),
    },
    strValue: switch (json['strValue']) {
      null => null,
      Object $1 => decodeString($1),
    },
    datetimeValue: switch (json['datetimeValue']) {
      null => null,
      Object $1 => decodeString($1),
    },
    boolValue: switch (json['boolValue']) {
      null => null,
      Object $1 => decodeBool($1),
    },
    listValue: switch (json['listValue']) {
      null => null,
      Object $1 => MetadataList.fromJson($1),
    },
  );
}