其他分享
首页 > 其他分享> > Flutter组件 底部ios弹框

Flutter组件 底部ios弹框

作者:互联网

 

需要写在事件中

           onTap: () {
                showCupertinoModalPopup(
                  context: context,
                  builder: (context) {
                    return CupertinoActionSheet(
//                      title: Text('', style: TextStyle(fontSize: AppConfig.screenUtil(val: 35, val2: 20)),), //标题
//                      message: Text('麻烦抽出几分钟对该软件进行评价,谢谢!'), //提示内容
                      actions: <Widget>[ //操作按钮集合
                        CupertinoActionSheetAction(
                          onPressed:  () {
                            NavigatorUtil.pushNamedWithParam(
                                context, Routes.addressedit, val['id'])
                                .then((v) {
                              resetData();
                            });
                          },
                          child: Text('编辑', style: TextStyle(fontSize: AppConfig.screenUtil(val: 30, val2: 20)),),
                        ),
                        CupertinoActionSheetAction(
                          onPressed:  () {
                            AppUtils.delDataById(val['id'], "address", () {
                              resetData();
                            });
                          },
                          child: Text('删除', style: TextStyle(fontSize: AppConfig.screenUtil(val: 30, val2: 20)),),
                        ),
                      ],
                      cancelButton: CupertinoActionSheetAction( //取消按钮
                        onPressed: () {
                          Navigator.pop(context);
                        },
                        child: Text('取消', style: TextStyle(fontSize: AppConfig.screenUtil(val: 30, val2: 20)),),
                      ),
                    );
                  },
                );

 

 

 

标签:TextStyle,style,val,Text,ios,弹框,context,val2,Flutter
来源: https://www.cnblogs.com/lude1994/p/15195287.html