$UikHomeCardNinePropsFromJson function

UikHomeCardNineProps $UikHomeCardNinePropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

UikHomeCardNineProps $UikHomeCardNinePropsFromJson(Map<String, dynamic> json) {
  final UikHomeCardNineProps uikHomeCardNineProps = UikHomeCardNineProps();
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    uikHomeCardNineProps.id = id;
  }
  final String? icon = jsonConvert.convert<String>(json['icon']);
  if (icon != null) {
    uikHomeCardNineProps.icon =
        UikIcon(WidgetType.UikText, UikIconProps.fromJson(json['icon']));
  }
  final String? badgeText = jsonConvert.convert<String>(json['badgeText']);
  if (badgeText != null) {
    uikHomeCardNineProps.badgeText = UikContainerText(
        WidgetType.UikText, UikContainerTextProps.fromJson(json['badgeText']));
  }

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

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

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

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