decode static method
Deserialize a json compatible object into a NapaWidget or null.
Implementation
static NapaWidget? decode(dynamic data) {
if (data == null) {
return null;
}
int flex = data['flex'];
return NapaExpanded(
flex: flex,
child: NapaWidget.decode(data['child']) ?? NapaContainer(),
);
}