fromJson method
Load the attributes of the widget descriptor from
Implementation
@override
SDUIWidget fromJson(Map<String, dynamic>? json) {
title = json?["title"];
elevation = json?["elevation"];
foregroundColor = json?["foregroundColor"];
backgroundColor = json?["backgroundColor"];
leading = _parse(json?["leading"]);
bottom = _parse(json?["bottom"]);
automaticallyImplyLeading = json?["automaticallyImplyLeading"];
var actions = json?["actions"];
if (actions is List<dynamic>) {
this.actions = [];
actions.map((it) => _parse(it)).forEach((it) {
if (it != null) {
this.actions?.add(it);
}
});
}
return this;
}