parse method
Widget
parse(
- Map<
String, dynamic> map, - BuildContext buildContext,
- ClickListener? listener
override
parse the json map into a flutter widget.
Implementation
@override
Widget parse(Map<String, dynamic> map, BuildContext buildContext,
ClickListener? listener) {
var scaffoldWidget = Scaffold(
appBar: map.containsKey("appBar")
? DynamicWidgetBuilder.buildFromMap(
map["appBar"], buildContext, listener) as PreferredSizeWidget?
: null,
body: map.containsKey("body")
? DynamicWidgetBuilder.buildFromMap(
map["body"], buildContext, listener)
: null,
floatingActionButton: map.containsKey("floatingActionButton")
? DynamicWidgetBuilder.buildFromMap(
map["floatingActionButton"], buildContext, listener)
: null,
backgroundColor: map.containsKey("backgroundColor")
? parseHexColor(map["backgroundColor"])
: null,
);
return scaffoldWidget;
}