Skip to content

Commit bec2442

Browse files
committed
fix: AlertDialog add action
1 parent 42274f5 commit bec2442

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/main.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ class _PickerThemeDialogState extends State<PickerThemeDialog> {
228228
itemSize - checkBoxSize + checkBoxSize * 0.8 / 2);
229229
var pickerIndex = context.watch<MainStore>().pickPrimaryColorIndex;
230230
return AlertDialog(
231+
actionsAlignment: MainAxisAlignment.center,
231232
content: ConstrainedBox(
232233
constraints: const BoxConstraints(maxWidth: 360),
233234
child: Column(
@@ -294,6 +295,11 @@ class _PickerThemeDialogState extends State<PickerThemeDialog> {
294295
],
295296
),
296297
),
298+
actions: [
299+
TextButton(
300+
onPressed: () => Navigator.of(context).pop(),
301+
child: Text('confirm'))
302+
],
297303
);
298304
}
299305
}

0 commit comments

Comments
 (0)