$UikExpandedTextPropsFromJson function

UikExpandedTextProps $UikExpandedTextPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

  final String? text = jsonConvert.convert<String>(json['text']);
  if (text != null) {
    uikExpandedTextProps.text = text;
  }

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

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

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

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

  // final String? color = jsonConvert.convert<String>(json['color']);
  // if (color != null) {
  //   uikExpandedTextProps.color = color.toColor();
  // }
  // final String? striketext = jsonConvert.convert<String>(json['striketext']);
  // if (striketext != null) {
  //   uikExpandedTextProps.striketext = striketext;
  // }
  // final bool? strikethrough = jsonConvert.convert<bool>(json['isStrike']);
  // if (strikethrough != null) {
  //   uikExpandedTextProps.isStrike = strikethrough;
  // }
  // final double? size = jsonConvert.convert<double>(json['size']);
  // if (size != null) {
  //   uikExpandedTextProps.size = size;
  // }

  // final String? normalFontWeight =
  //     jsonConvert.convert<String>(json['normalFontWeight']);
  // if (normalFontWeight != null) {
  //   if (normalFontWeight == "FontWeight.bold") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.bold;
  //   }
  //   if (normalFontWeight == "FontWeight.w100") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w100;
  //   }
  //   if (normalFontWeight == "FontWeight.w200") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w200;
  //   }
  //   if (normalFontWeight == "FontWeight.w300") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w300;
  //   }
  //   if (normalFontWeight == "FontWeight.w400") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w400;
  //   }
  //   if (normalFontWeight == "FontWeight.w500") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w500;
  //   }
  //   if (normalFontWeight == "FontWeight.w600") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w600;
  //   }
  //   if (normalFontWeight == "FontWeight.w700") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w700;
  //   }
  //   if (normalFontWeight == "FontWeight.w800") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w800;
  //   }
  //   if (normalFontWeight == "FontWeight.w900") {
  //     uikExpandedTextProps.normalFontWeight = FontWeight.w900;
  //   }
  // }

  // final String? strikenFontWeight =
  //     jsonConvert.convert<String>(json['strikenFontWeight ']);
  // if (strikenFontWeight != null) {
  //   if (strikenFontWeight == "FontWeight.bold") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.bold;
  //   }
  //   if (strikenFontWeight == "FontWeight.w100") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w100;
  //   }
  //   if (strikenFontWeight == "FontWeight.w200") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w200;
  //   }
  //   if (strikenFontWeight == "FontWeight.w300") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w300;
  //   }
  //   if (strikenFontWeight == "FontWeight.w400") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w400;
  //   }
  //   if (strikenFontWeight == "FontWeight.w500") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w500;
  //   }
  //   if (strikenFontWeight == "FontWeight.w600") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w600;
  //   }
  //   if (strikenFontWeight == "FontWeight.w700") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w700;
  //   }
  //   if (strikenFontWeight == "FontWeight.w800") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w800;
  //   }
  //   if (strikenFontWeight == "FontWeight.w900") {
  //     uikExpandedTextProps.strikenFontWeight = FontWeight.w900;
  //   }
  // }

  // final String? align = jsonConvert.convert<String>(json['textalign']);
  // if (align != null) {
  //   if (align == "TextAlign.center") {
  //     uikExpandedTextProps.textalign = TextAlign.center;
  //   }
  //   if (align == "TextAlign.end") {
  //     uikExpandedTextProps.textalign = TextAlign.end;
  //   }
  //   if (align == "TextAlign.start") {
  //     uikExpandedTextProps.textalign = TextAlign.start;
  //   }
  //   if (align == "TextAlign.left") {
  //     uikExpandedTextProps.textalign = TextAlign.left;
  //   }
  //   if (align == "TextAlign.right") {
  //     uikExpandedTextProps.textalign = TextAlign.right;
  //   }
  //   if (align == "TextAlign.justify") {
  //     uikExpandedTextProps.textalign = TextAlign.justify;
  //   }
  // }

  // final String? fontFamily = jsonConvert.convert<String>(json['fontFamily']);
  // if (fontFamily != null) {
  //   uikExpandedTextProps.fontFamily = fontFamily;
  // }
  // final double? width = jsonConvert.convert<double>(json['width']);
  // if (width != null) {
  //   uikExpandedTextProps.width = width;
  // } else {
  //   uikExpandedTextProps.width = null;
  // }

  // final double? height = jsonConvert.convert<double>(json['height']);
  // if (height != null) {
  //   uikExpandedTextProps.height = height;
  // } else {
  //   uikExpandedTextProps.height = null;
  // }

  // final bool? isCenter = jsonConvert.convert<bool>(json['isCenter']);
  // if (isCenter != null) {
  //   uikExpandedTextProps.isCenter = isCenter;
  // }

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