PatchbayNavigationCurrentWire.fromJson constructor

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

Decodes a strict JSON object at path.

Implementation

factory PatchbayNavigationCurrentWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'outcome',
    'source',
    'navigationRevision',
    'destinationId',
  }, path);
  return PatchbayNavigationCurrentWire(
    outcome: _wireString(json['outcome'], '$path.outcome'),
    source: PatchbayFactSourceWire.fromJson(
      json['source'],
      path: '$path.source',
    ),
    navigationRevision: _wireInt(
      json['navigationRevision'],
      '$path.navigationRevision',
    ),
    destinationId: json['destinationId'] == null
        ? null
        : _wireString(json['destinationId'], '$path.destinationId'),
  );
}