showBottomAlertAndroid method
dynamic
showBottomAlertAndroid({
- required dynamic list,
- dynamic callback,
- dynamic title,
底部弹出提示框
Implementation
showBottomAlertAndroid({required list, callback, title}) {
return showCupertinoModalPopup(
barrierColor: barrierColor,
context: context,
builder: (context) {
return XButton(
callback: () {
Navigator.pop(context);
},
child: Scaffold(
backgroundColor: Colors.transparent,
body: Column(mainAxisAlignment: MainAxisAlignment.end, children: [
Column(
children: [
Column(
children: List.generate(
list.length,
(index) => XButton(
callback: () {
Navigator.pop(context);
callback(index);
},
child: Text(list[index],
style: font(32, colorA: themeColor.ff0E0D15))
.center
.background(
height: 112.w, borderTop: index == 0 ? 0 : 1.w),
),
),
),
Container(
height: 20.w,
color: themeColor.ffF3F6F9,
),
XButton(
callback: () {
Navigator.pop(context);
},
child: Text(
'取消',
style: font(32, colorA: themeColor.ff0E0D15),
).center.background(height: 110.w),
)
],
)
.background(
color: themeColor.ffFFFFFF, topRight: 16.w, topLeft: 16.w)
.bottomCenter
]),
),
);
},
);
}