$UikJarItemPropsFromJson function

UikJarItemProps $UikJarItemPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

  final double? leftMargin = jsonConvert.convert<double>(json['leftMargin']);
  if (leftMargin != null) {
    uikJarItemProps.leftMargin = leftMargin;
  }

  final double? rightMargin = jsonConvert.convert<double>(json['rightMargin']);
  if (rightMargin != null) {
    uikJarItemProps.rightMargin = rightMargin;
  }

  final double? topMargin = jsonConvert.convert<double>(json['topMargin']);
  if (topMargin != null) {
    uikJarItemProps.topMargin = topMargin;
  }

  final double? bottomMargin =
      jsonConvert.convert<double>(json['bottomMargin']);
  if (bottomMargin != null) {
    uikJarItemProps.bottomMargin = bottomMargin;
  }

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

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

  return uikJarItemProps;
}