PatchbaySemanticsNodeWire.fromJson constructor
Decodes a strict JSON object at path.
Implementation
factory PatchbaySemanticsNodeWire.fromJson(
Map<String, Object?> json, {
String path = r'$',
}) {
_wireKeys(json, const <String>{
'nodeId',
'generation',
'parentNodeId',
'depth',
'identifier',
'label',
'value',
'valueRedacted',
'hint',
'tooltip',
'flags',
'actions',
'invisible',
'userActionsBlocked',
'rect',
'rectCoordinateSpace',
'transformToParent',
'scrollPosition',
'scrollExtentMin',
'scrollExtentMax',
'platformViewId',
'children',
}, path);
return PatchbaySemanticsNodeWire(
nodeId: _wireInt(json['nodeId'], '$path.nodeId'),
generation: _wireInt(json['generation'], '$path.generation'),
parentNodeId: json['parentNodeId'] == null
? null
: _wireInt(json['parentNodeId'], '$path.parentNodeId'),
depth: _wireInt(json['depth'], '$path.depth'),
identifier: _wireString(json['identifier'], '$path.identifier'),
label: _wireString(json['label'], '$path.label'),
value: json['value'] == null
? null
: _wireString(json['value'], '$path.value'),
valueRedacted: json['valueRedacted'] == null
? null
: _wireBool(json['valueRedacted'], '$path.valueRedacted'),
hint: json['hint'] == null
? null
: _wireString(json['hint'], '$path.hint'),
tooltip: json['tooltip'] == null
? null
: _wireString(json['tooltip'], '$path.tooltip'),
flags: _wireList(json['flags'], '$path.flags')
.map((item) => _wireString(item, '$path.flags[]'))
.toList(growable: false),
actions: _wireList(json['actions'], '$path.actions')
.map((item) => _wireString(item, '$path.actions[]'))
.toList(growable: false),
invisible: _wireBool(json['invisible'], '$path.invisible'),
userActionsBlocked: _wireBool(
json['userActionsBlocked'],
'$path.userActionsBlocked',
),
rect: PatchbaySemanticsRectWire.fromJson(
_wireMap(json['rect'], '$path.rect'),
path: '$path.rect',
),
rectCoordinateSpace: _wireString(
json['rectCoordinateSpace'],
'$path.rectCoordinateSpace',
),
transformToParent: json['transformToParent'] == null
? null
: _wireList(json['transformToParent'], '$path.transformToParent')
.map((item) => _wireNum(item, '$path.transformToParent[]'))
.toList(growable: false),
scrollPosition: json['scrollPosition'] == null
? null
: _wireNum(json['scrollPosition'], '$path.scrollPosition'),
scrollExtentMin: json['scrollExtentMin'] == null
? null
: _wireNum(json['scrollExtentMin'], '$path.scrollExtentMin'),
scrollExtentMax: json['scrollExtentMax'] == null
? null
: _wireNum(json['scrollExtentMax'], '$path.scrollExtentMax'),
platformViewId: json['platformViewId'] == null
? null
: _wireInt(json['platformViewId'], '$path.platformViewId'),
children: _wireList(json['children'], '$path.children')
.map((item) => _wireInt(item, '$path.children[]'))
.toList(growable: false),
);
}