$UikHomeCardThreePropsFromJson function

UikHomeCardThreeProps $UikHomeCardThreePropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

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

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

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