马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
flutter 提示框 写在点击的方法体中
child里放自己喜好的
- showDialog(
- context: context,
- builder: (BuildContext context) {
- final Dialog alertDialog = Dialog(
- backgroundColor: Colors.transparent,
- shadowColor:Colors.transparent,
- child: Container(
- height: mediawidth*0.25,
- width: mediawidth*0.5,
- decoration: BoxDecoration(
- // color: Colors.transparent,
- image: DecorationImage(
- image: AssetImage('assets/images/choosed.png'),
- fit: BoxFit.contain,
- ),
- ),
- ),
-
- );
-
- // 使用Future.delayed来在1秒后自动关闭对话框
- Future.delayed(Duration(milliseconds: 700), () {
- Navigator.of(context).pop();
- });
-
- return alertDialog;
- },
- );
复制代码 [code][/code]
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |