$UikHomeCardFivePropsFromJson function
Implementation
UikHomeCardFiveProps $UikHomeCardFivePropsFromJson(Map<String, dynamic> json) {
final UikHomeCardFiveProps uikHomeCardFiveProps = UikHomeCardFiveProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikHomeCardFiveProps.id = id;
}
final String? text = jsonConvert.convert<String>(json['text']);
if (text != null) {
uikHomeCardFiveProps.text =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['text']));
}
final double? marginLeft = jsonConvert.convert<double>(json['marginLeft']);
if (marginLeft != null) {
uikHomeCardFiveProps.marginLeft = marginLeft;
}
final double? marginRight = jsonConvert.convert<double>(json['marginRight']);
if (marginRight != null) {
uikHomeCardFiveProps.marginRight = marginRight;
}
final double? marginTop = jsonConvert.convert<double>(json['marginTop']);
if (marginTop != null) {
uikHomeCardFiveProps.marginTop = marginTop;
}
final double? marginBottom =
jsonConvert.convert<double>(json['marginBottom']);
if (marginBottom != null) {
uikHomeCardFiveProps.marginBottom = marginBottom;
}
final String? image = jsonConvert.convert<String>(json['image']);
if (image != null) {
uikHomeCardFiveProps.image = UikImage(
WidgetType.UikText,
UikImageProps.fromJson(
json['image'],
),
);
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikHomeCardFiveProps.action = action;
}
return uikHomeCardFiveProps;
}