decode static method
Deserialize a json compatible object into a NapaWidget or null.
Implementation
static NapaSemantics? decode(dynamic data) {
if (data == null) return null;
return NapaSemantics(
container: data['container'] ?? false,
explicitChildNodes: data['explicitChildNodes'] ?? false,
excludeSemantics: data['excludeSemantics'] ?? false,
enabled: data['enabled'] as bool?,
checked: data['checked'] as bool?,
selected: data['selected'] as bool?,
button: data['button'] as bool?,
link: data['link'] as bool?,
header: data['header'] as bool?,
textField: data['textField'] as bool?,
readOnly: data['readOnly'] as bool?,
focusable: data['focusable'] as bool?,
focused: data['focused'] as bool?,
hidden: data['hidden'] as bool?,
image: data['image'] as bool?,
liveRegion: data['liveRegion'] as bool?,
obscured: data['obscured'] as bool?,
multiline: data['multiline'] as bool?,
scopesRoute: data['scopesRoute'] as bool?,
namesRoute: data['namesRoute'] as bool?,
label: data['label'] as String?,
value: data['value'] as String?,
hint: data['hint'] as String?,
child: NapaWidget.decode(data['child']),
);
}