「Flutter/alert」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「==OK/Cancel確認フォーム== <pre> showDialog( context: context, builder: (context) { return CupertinoAlertDialog( title: Text("タイトル1"), co...」) |
(→OK/Cancel確認フォーム) |
||
| 行22: | 行22: | ||
); | ); | ||
</pre> | </pre> | ||
| + | |||
| + | 参考:https://qiita.com/coka__01/items/4c1aea5fb1646e463f91 | ||
2019年11月16日 (土) 13:07時点における版
OK/Cancel確認フォーム
showDialog(
context: context,
builder: (context) {
return CupertinoAlertDialog(
title: Text("タイトル1"),
content: Text("本文1"),
actions: <Widget>[
CupertinoDialogAction(
child: Text("Cancel"),
isDestructiveAction: true,
onPressed: () => Navigator.pop(context),
),
CupertinoDialogAction(
child: Text("OK"),
onPressed: () => Navigator.pop(context),
),
],
);
},
);
