$UikRadioButtonListPropsFromJson function
Implementation
UikRadioButtonListProps $UikRadioButtonListPropsFromJson(
Map<String, dynamic> json) {
final UikRadioButtonListProps uikRadioButtonListProps =
UikRadioButtonListProps();
final String? id = jsonConvert.convert<String>(json['id']);
final List<dynamic>? textList =
jsonConvert.convert<List<dynamic>>(json["textList"]);
final List<dynamic>? subTextList =
jsonConvert.convert<List<dynamic>>(json["subTextList"]);
final double? height = jsonConvert.convert<double>(json["height"]);
final double? leftMargin = jsonConvert.convert<double>(json["leftMargin"]);
final double? rightMargin = jsonConvert.convert<double>(json["rightMargin"]);
final double? topMargin = jsonConvert.convert<double>(json["topMargin"]);
final double? bottomMargin =
jsonConvert.convert<double>(json["bottomMargin"]);
final List<UikAction>? actionList =
jsonConvert.convert<List<UikAction>>(json["actionList"]);
if (id != null) {
uikRadioButtonListProps.id = id;
}
if (textList != null) {
for (int i = 0; i < textList.length; i++) {
uikRadioButtonListProps.textList.add(
UikText(
WidgetType.UikText,
UikTextProps.fromJson(
textList[i],
),
),
);
}
}
if (subTextList != null) {
for (int i = 0; i < subTextList.length; i++) {
uikRadioButtonListProps.subTextList?.add(
UikText(
WidgetType.UikText,
UikTextProps.fromJson(
subTextList[i],
),
),
);
}
}
if (actionList != null) {
for (int i = 0; i < actionList.length; i++) {
uikRadioButtonListProps.actionList.add(actionList[i]);
}
}
if (height != null) {
uikRadioButtonListProps.height = height;
}
if (leftMargin != null) {
uikRadioButtonListProps.leftMargin = leftMargin;
}
if (rightMargin != null) {
uikRadioButtonListProps.rightMargin = rightMargin;
}
if (topMargin != null) {
uikRadioButtonListProps.topMargin = topMargin;
}
if (bottomMargin != null) {
uikRadioButtonListProps.bottomMargin = bottomMargin;
}
return uikRadioButtonListProps;
}