PatchbayCaptureDiffResultWire.fromJson constructor
Decodes a strict JSON object at path.
Implementation
factory PatchbayCaptureDiffResultWire.fromJson(
Map<String, Object?> json, {
String path = r'$',
}) {
_wireKeys(json, const <String>{
'outcome',
'source',
'beforeBlobId',
'afterBlobId',
'width',
'height',
'pixelFormat',
'changedPixels',
'totalPixels',
'differenceRatio',
'comparedAt',
'maxPixels',
'maxBytes',
'warnings',
}, path);
return PatchbayCaptureDiffResultWire(
outcome: _wireString(json['outcome'], '$path.outcome'),
source: PatchbayFactSourceWire.fromJson(
json['source'],
path: '$path.source',
),
beforeBlobId: _wireString(json['beforeBlobId'], '$path.beforeBlobId'),
afterBlobId: _wireString(json['afterBlobId'], '$path.afterBlobId'),
width: _wireInt(json['width'], '$path.width'),
height: _wireInt(json['height'], '$path.height'),
pixelFormat: _wireString(json['pixelFormat'], '$path.pixelFormat'),
changedPixels: _wireInt(json['changedPixels'], '$path.changedPixels'),
totalPixels: _wireInt(json['totalPixels'], '$path.totalPixels'),
differenceRatio: _wireNum(
json['differenceRatio'],
'$path.differenceRatio',
),
comparedAt: _wireString(json['comparedAt'], '$path.comparedAt'),
maxPixels: _wireInt(json['maxPixels'], '$path.maxPixels'),
maxBytes: _wireInt(json['maxBytes'], '$path.maxBytes'),
warnings: _wireList(json['warnings'], '$path.warnings')
.map(
(item) => PatchbayCaptureWarningWire.fromJson(
item,
path: '$path.warnings[]',
),
)
.toList(growable: false),
);
}