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) {
return Icon(
map.containsKey('data')
? getIconUsingPrefix(name: map['data'])
: Icons.android,
size: map.containsKey("size") ? map['size']?.toDouble() : null,
color: map.containsKey('color') ? parseHexColor(map['color']) : null,
semanticLabel:
map.containsKey('semanticLabel') ? map['semanticLabel'] : null,
textDirection: map.containsKey('textDirection')
? parseTextDirection(map['textDirection'])
: null,
);
}