WidgetProps.fromJson constructor
WidgetProps.fromJson(
- Map<String, dynamic> json
)
Implementation
factory WidgetProps.fromJson(Map<String, dynamic> json) {
return WidgetProps(
margin: json["margin"] == null ? null : Border.fromJson(json["margin"]),
padding:
json["padding"] == null ? null : Border.fromJson(json["padding"]),
width: json["width"],
height: json["height"],
constWidth: json["constWidth"],
constHeight: json["constHeight"],
hasBg: json["hasBg"],
bgColor: json["bgColor"],
bgOpacity: json["bgOpacity"],
horiAlignment: json["horiAlignment"],
verAlignment: json["verAlignment"],
hasBorder: json["hasBorder"],
borderWidth: json["borderWidth"],
borderColor: json["borderColor"],
borderOpacity: json["borderOpacity"],
roundness: json["roundness"],
border: json["border"] == null ? null : Border.fromJson(json["border"]),
hasAction: json["hasAction"],
clickType: json["clickType"],
target: json["target"],
hasTransition: json["hasTransition"],
transition: json["transition"],
orientation: json["orientation"],
asset: json["asset"],
bgObjectFit: json["bgObjectFit"],
bgHeight: json["bgHeight"],
bgWidth: json["bgWidth"],
bgLeft: json["bgLeft"],
bgTop: json["bgTop"],
horiContentAlignment: json["horiContentAlignment"],
verContentAlignment: json["verContentAlignment"],
children: json["children"] == null
? []
: List<dynamic>.from(json["children"]!.map((x) => x)),
text: json["text"],
fontColor: json["fontColor"],
fontSize: json["fontSize"],
fontWeight: json["fontWeight"],
lineHeight: json["lineHeight"],
alignment: json["alignment"],
autoLink: json["autoLink"],
style: json["style"],
);
}