$UikTextRadioButtonPropsFromJson function

UikTextRadioButtonProps $UikTextRadioButtonPropsFromJson(
  1. Map<String, dynamic> json
)

Implementation

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

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

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

  // final String? itemList = jsonConvert.convert<String>(json['itemList']);
  // print(itemList);
  // print("object");
  // if (itemList != null) {
  //   uikTextRadioButtonProps.itemList = itemList.split(",");
  // }

  final String? radiobutton = jsonConvert.convert<String>(json['radiobutton']);
  if (radiobutton != null) {
    uikTextRadioButtonProps.radiobutton = UikRadioButton(
        WidgetType.UikRadioButton,
        UikRadioButtonProps.fromJson(json['radiobutton']));
  }

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

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

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

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

  return uikTextRadioButtonProps;
}