$UikHomeCardFourPropsFromJson function

UikHomeCardFourProps $UikHomeCardFourPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

  final String? text = jsonConvert.convert<String>(json['text']);
  if (text != null) {
    uikHomeCardFourProps.text =
        UikText(WidgetType.UikText, UikTextProps.fromJson(json['text']));
  }

  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    uikHomeCardFourProps.image = UikImage(
      WidgetType.UikText,
      UikImageProps.fromJson(
        json['image'],
      ),
    );
  }

  final String? tag = jsonConvert.convert<String>(json['tag']);
  if (tag != null) {
    uikHomeCardFourProps.tag =
        UikTags(WidgetType.UikText, UikTagsProps.fromJson(json['tag']));
  }

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