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 scrollDirection = Axis.vertical;
if (map.containsKey("scrollDirection") &&
"horizontal" == map["scrollDirection"]) {
scrollDirection = Axis.horizontal;
}
return PageView(
scrollDirection: scrollDirection,
reverse: map.containsKey("reverse") ? map["reverse"] : false,
pageSnapping:
map.containsKey("pageSnapping") ? map["pageSnapping"] : true,
children: DynamicWidgetBuilder.buildWidgets(
map['children'], buildContext, listener),
);
}