$UikActionSheetPropsFromJson function
Implementation
UikActionSheetProps $UikActionSheetPropsFromJson(Map<String, dynamic> json) {
// print("object");
final UikActionSheetProps uikActionSheetProps = UikActionSheetProps();
final String? id = jsonConvert.convert<String>(json['id']);
if (id != null) {
uikActionSheetProps.id = id;
}
final String? title = jsonConvert.convert<String>(json['title']);
if (title != null) {
uikActionSheetProps.title = title;
}
final String? itemList = jsonConvert.convert<String>(json['itemList']);
if (itemList != null) {
uikActionSheetProps.itemList = itemList.split(",");
}
final String? widget = jsonConvert.convert<String>(json['widget']);
// print(widget);
if (widget != null) {
uikActionSheetProps.widget = UikProductInformationComp(WidgetType.UikText,
UikProductInformationCompProps.fromJson(json['widget']));
}
final String? checkbox = jsonConvert.convert<String>(json['checkbox']);
if (checkbox != null) {
uikActionSheetProps.checkbox = UikRadioButton(
WidgetType.UikText, UikRadioButtonProps.fromJson(json['checkbox']));
}
final String? cancelButton =
jsonConvert.convert<String>(json['cancelButton']);
if (cancelButton != null) {
uikActionSheetProps.cancelButton = UikButton(
WidgetType.UikButton, UikButtonProps.fromJson(json['cancelButton']));
}
final UikAction? action = jsonConvert.convert<UikAction>(json['action']);
if (action != null) {
uikActionSheetProps.action = action;
}
return uikActionSheetProps;
}