-
弹出一个iOS样式的弹出框
代码:
showCupertinoDialog(
context:context,
builder:(BuildContext context){
return new CupertinoAlertDialog(
title: new Text(
"标题",
),
content: new Text("内容"),
actions: <Widget>[
new Container(
decoration: BoxDecoration(
border: Border(right:BorderSide(color: themeData.dividerColor,width: 1.0),top:BorderSide(color: themeData.dividerColor,width: 1.0))
),
child: FlatButton(
child: new Text("确定"),
onPressed:(){
Navigator.pop(context);
},
),
),
new Container(
decoration: BoxDecoration(
border: Border(top:BorderSide(color: themeData.dividerColor,width: 1.0))
),
child: FlatButton(
child: new Text("取消"),
onPressed:(){
Navigator.pop(context);
},
),
)
],
);
}
);
-
默认样式的
CupertinoAlertDialog 换成AlertDialog