PatchbayCatalogDigestWire.fromJson constructor

PatchbayCatalogDigestWire.fromJson(
  1. Map<String, Object?> json, {
  2. String path = r'$',
})

Decodes a strict JSON object at path.

Implementation

factory PatchbayCatalogDigestWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{'algorithm', 'covers', 'value'}, path);
  return PatchbayCatalogDigestWire(
    algorithm: _wireString(json['algorithm'], '$path.algorithm'),
    covers: _wireList(json['covers'], '$path.covers')
        .map((item) => _wireString(item, '$path.covers[]'))
        .toList(growable: false),
    value: _wireString(json['value'], '$path.value'),
  );
}