teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

codeの修正

2021/03/19 00:08

投稿

atk_721
atk_721

スコア62

title CHANGED
File without changes
body CHANGED
@@ -151,4 +151,29 @@
151
151
 
152
152
  ```
153
153
 
154
- iOS,Androidどちらもエラーが発生します。
154
+ iOS,Androidどちらもエラーが発生します。
155
+
156
+ ###試したこと
157
+ show_alert_dialog.dart内を変更
158
+ ```ここに言語を入力
159
+ showDialog(
160
+ context: context,
161
+ builder: (context) => AlertDialog(
162
+ title: Text(title),
163
+ ***Containerでラップして高さと幅を持たせる***
164
+ content: Container(width: 300, height: 400, child: Text(content)),
165
+ actions: <Widget>[
166
+ if (cancelActionText != null) ...{
167
+ TextButton(
168
+ onPressed: () => Navigator.of(context).pop(false),
169
+ child: Text(cancelActionText),
170
+ ),
171
+ },
172
+ TextButton(
173
+ onPressed: () => Navigator.of(context).pop(true),
174
+ child: Text(defaultActionText),
175
+ ),
176
+ ],
177
+ ),
178
+ );
179
+ ```