首页 > 解决方案 > 颤振:我可以调整 CupertinoAlertDialog(iOS 样式)的宽度或高度吗?

问题描述

我是新来的。我想要一个 iOS 风格的应用程序,所以我使用 CupertinoAlertDialog。但我想自定义它的高度和宽度。那可能吗?这是我所做的。


  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      home: Scaffold(
        body: RaisedButton(
          child: Text("Pick Me !!!"),
          onPressed: () {
            showDialog(
              context: context,
              builder: (_) => Center(
                child: CupertinoAlertDialog (
                  title: new Text("drop out"),
                  content: new Text("quit the window"),
                  actions: <Widget>[
                    FlatButton(
                      child: Text('Cancle!'),
                      onPressed: () {
                      Navigator.pop(_);
                      },
                    ),
                    FlatButton(
                      child: Text('OK'),
                      onPressed: () {
                      Navigator.pop(_);
                      },
                    )
                  ],
                ),
              )
            );
          },
        )
      ),
    );
  }

标签: flutter

解决方案


推荐阅读