$UikHomeCardElevenPropsFromJson function
Implementation
UikHomeCardElevenProps $UikHomeCardElevenPropsFromJson(
Map<String, dynamic> json) {
final UikHomeCardElevenProps uikHomeCardElevenProps =
UikHomeCardElevenProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikHomeCardElevenProps.id = id;
}
final String? desc = jsonConvert.convert<String>(json['desc']);
if (desc != null) {
uikHomeCardElevenProps.desc =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['desc']));
}
final String? price = jsonConvert.convert<String>(json['price']);
if (price != null) {
uikHomeCardElevenProps.price =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['price']));
}
final String? button = jsonConvert.convert<String>(json['button']);
if (button != null) {
uikHomeCardElevenProps.button =
UikButton(WidgetType.UikText, UikButtonProps.fromJson(json['button']));
}
final double? marginLeft = jsonConvert.convert<double>(json['marginLeft']);
if (marginLeft != null) {
uikHomeCardElevenProps.marginLeft = marginLeft;
}
final double? marginRight = jsonConvert.convert<double>(json['marginRight']);
if (marginRight != null) {
uikHomeCardElevenProps.marginRight = marginRight;
}
final double? marginTop = jsonConvert.convert<double>(json['marginTop']);
if (marginTop != null) {
uikHomeCardElevenProps.marginTop = marginTop;
}
final double? marginBottom =
jsonConvert.convert<double>(json['marginBottom']);
if (marginBottom != null) {
uikHomeCardElevenProps.marginBottom = marginBottom;
}
final String? image = jsonConvert.convert<String>(json['image']);
if (image != null) {
uikHomeCardElevenProps.image = UikImage(
WidgetType.UikText,
UikImageProps.fromJson(
json['image'],
),
);
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikHomeCardElevenProps.action = action;
}
return uikHomeCardElevenProps;
}