GenUiSemanticNode.fromJson constructor
Reads back a node written by toJson.
Implementation
factory GenUiSemanticNode.fromJson(Map<String, Object?> json) =>
GenUiSemanticNode(
role: json['role'] as String? ?? 'group',
name: json['name'] as String? ?? '',
value: json['value'] as String? ?? '',
tooltip: json['tooltip'] as String? ?? '',
state: <String, bool>{
for (final entry
in (json['state'] as Map<String, Object?>? ??
const <String, Object?>{})
.entries)
entry.key: entry.value! as bool,
},
actions: <String>[
for (final action in json['actions'] as List<Object?>? ?? const [])
action! as String,
],
);