$UikHomeCardTwelvePropsFromJson function

UikHomeCardTwelveProps $UikHomeCardTwelvePropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

  final String? badgeText = jsonConvert.convert<String>(json['badgeText']);
  if (badgeText != null) {
    uikHomeCardTwelveProps.badgeText = UikContainerText(
        WidgetType.UikText, UikContainerTextProps.fromJson(json['badgeText']));
  }

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

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

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