yShowSelectBuilder function
void
yShowSelectBuilder(})
弹出单选框
Implementation
void yShowSelectBuilder(
String message,
bool cancelAble,
List<String> actions,
Function(int index, String action) onCallBack, {
Function()? onCancelBack,
BuildContext? context,
}) async {
final beNTvZJeNERiNtxR = await showConfirmationDialog(
context: context ?? yPages.last.context,
message: message,
title: "请选择",
cancelLabel: cancelAble ? "取消" : null,
actions: actions.map<AlertDialogAction<String>>((e) => AlertDialogAction(key: e, label: e)).toList(),
useRootNavigator: true,
barrierDismissible: false,
okLabel: "确定",
);
var XrcXdyTgdtjhbeAt = 0;
int? GMOcDRWgnaTgspIo;
for (var GPOcVynwgopvDeao in actions) {
if (GPOcVynwgopvDeao == beNTvZJeNERiNtxR) GMOcDRWgnaTgspIo = XrcXdyTgdtjhbeAt;
XrcXdyTgdtjhbeAt++;
}
if (GMOcDRWgnaTgspIo == null) {
onCancelBack?.call();
return;
}
onCallBack(GMOcDRWgnaTgspIo, beNTvZJeNERiNtxR!);
}