$UikHomeCardSixPropsFromJson function

UikHomeCardSixProps $UikHomeCardSixPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikHomeCardSixProps $UikHomeCardSixPropsFromJson(Map<String, dynamic> json) {
  final UikHomeCardSixProps uikHomeCardSixProps = UikHomeCardSixProps();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    uikHomeCardSixProps.id = id;
  }

  final String? text1 = jsonConvert.convert<String>(json['text1']);
  if (text1 != null) {
    uikHomeCardSixProps.text1 =
        UikText(WidgetType.UikText, UikTextProps.fromJson(json['text1']));
  }
  final String? text2 = jsonConvert.convert<String>(json['text2']);
  if (text2 != null) {
    uikHomeCardSixProps.text2 =
        UikText(WidgetType.UikText, UikTextProps.fromJson(json['text2']));
  }
  final double? starCount = jsonConvert.convert<double>(json['starCount']);
  if (starCount != null) {
    uikHomeCardSixProps.starCount = starCount;
  }
  final double? marginLeft = jsonConvert.convert<double>(json['marginLeft']);
  if (marginLeft != null) {
    uikHomeCardSixProps.marginLeft = marginLeft;
  }
  final double? marginRight = jsonConvert.convert<double>(json['marginRight']);
  if (marginRight != null) {
    uikHomeCardSixProps.marginRight = marginRight;
  }
  final double? marginTop = jsonConvert.convert<double>(json['marginTop']);
  if (marginTop != null) {
    uikHomeCardSixProps.marginTop = marginTop;
  }
  final double? marginBottom =
      jsonConvert.convert<double>(json['marginBottom']);
  if (marginBottom != null) {
    uikHomeCardSixProps.marginBottom = marginBottom;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    uikHomeCardSixProps.image = UikImage(
      WidgetType.UikText,
      UikImageProps.fromJson(
        json['image'],
      ),
    );
  }

  final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
  if (action != null) {
    uikHomeCardSixProps.action = action;
  }
  return uikHomeCardSixProps;
}