PatchbayCaptureRequestWire.fromJson constructor

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

Decodes a strict JSON object at path.

Implementation

factory PatchbayCaptureRequestWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'targetId',
    'generation',
    'pixelRatio',
    'timeoutMs',
    'afterFrames',
  }, path);
  return PatchbayCaptureRequestWire(
    targetId: json['targetId'] == null
        ? null
        : _wireString(json['targetId'], '$path.targetId'),
    generation: json['generation'] == null
        ? null
        : _wireInt(json['generation'], '$path.generation'),
    pixelRatio: json['pixelRatio'] == null
        ? null
        : _wireNum(json['pixelRatio'], '$path.pixelRatio'),
    timeoutMs: json['timeoutMs'] == null
        ? null
        : _wireInt(json['timeoutMs'], '$path.timeoutMs'),
    afterFrames: json['afterFrames'] == null
        ? null
        : _wireInt(json['afterFrames'], '$path.afterFrames'),
  );
}