$UikHeadlinePropsFromJson function
Implementation
UikHeadlineProps $UikHeadlinePropsFromJson(Map<String, dynamic> json) {
final UikHeadlineProps uikHeadlineProps = UikHeadlineProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikHeadlineProps.id = id;
}
final double? leftMargin = jsonConvert.convert<double>(json['leftMargin']);
if (leftMargin != null) {
uikHeadlineProps.leftMargin = leftMargin;
}
final double? rightMargin = jsonConvert.convert<double>(json['rightMargin']);
if (rightMargin != null) {
uikHeadlineProps.rightMargin = rightMargin;
}
final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
if (topMargin != null) {
uikHeadlineProps.topMargin = topMargin;
}
final double? bottomMargin =
jsonConvert.convert<double>(json['bottomMargin']);
if (bottomMargin != null) {
uikHeadlineProps.bottomMargin = bottomMargin;
}
final String? firstText = jsonConvert.convert<String>(json['firstText']);
if (firstText != null) {
uikHeadlineProps.firstText =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['firstText']));
}
final String? secondText = jsonConvert.convert<String>(json['secondText']);
if (secondText != null) {
uikHeadlineProps.secondText =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['secondText']));
}
final String? thirdText = jsonConvert.convert<String>(json['thirdText']);
if (thirdText != null) {
uikHeadlineProps.thirdText =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['thirdText']));
}
final String? fourthText = jsonConvert.convert<String>(json['fourthText']);
if (fourthText != null) {
uikHeadlineProps.fourthText =
UikText(WidgetType.UikText, UikTextProps.fromJson(json['fourthText']));
}
final String? imageUrl = jsonConvert.convert<String>(json['imageUrl']);
if (imageUrl != null) {
uikHeadlineProps.imageUrl = imageUrl;
}
final String? secondimageUrl =
jsonConvert.convert<String>(json['secondimageUrl']);
if (secondimageUrl != null) {
uikHeadlineProps.secondimageUrl = secondimageUrl;
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikHeadlineProps.action = action;
}
return uikHeadlineProps;
}