flutter - 颤振:我可以调整 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(_);
},
)
],
),
)
);
},
)
),
);
}
解决方案
推荐阅读
- google-cloud-platform - 谷歌云存储应用推荐
- javascript - 如何同时加载多个 iframe?
- debugging - Chrome 扩展程序 - 调试“aww 出了点问题”错误
- php - for 循环只执行一次
- python - 如何使用 Python 从 Bigtable 中获取过滤后的数据?
- css - 由于在上部添加了额外的文本,令人不安的 bootstrap4 按钮水平对齐?
- java - 9x9 位板实现
- angular - 角度材料表中的角度 7 图像显示
- spring-data-redis - 工厂方法“redisConnectionFactory”抛出异常;主机名不能为 null 或为空
- python - 在 cloudera pyspark 笔记本中绘图不起作用