Skip to content

Commit 04f4e80

Browse files
author
Laks Castro
authored
Merge pull request #102 from lakscastro/chore/improve-confirmation-dialog-message
Improve `/example` confirmation dialog description
2 parents 6cad20c + 823bf8f commit 04f4e80

File tree

2 files changed

+22
-17
lines changed

2 files changed

+22
-17
lines changed

example/lib/screens/file_explorer/file_explorer_card.dart

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,17 @@ class _FileExplorerCardState extends State<FileExplorerCard> {
7979
action,
8080
callback,
8181
message: [
82-
normal('This action '),
83-
bold('writes'),
84-
normal(' to this file, '),
85-
bold('it can '),
86-
bold(red('corrupt the file ')),
87-
normal('or'),
88-
bold(red(' even lose your data')),
89-
normal(', be cautious.'),
82+
normal('You are '),
83+
bold('writing'),
84+
normal(' to this file and it is '),
85+
bold('not a reversible action'),
86+
normal('. It can '),
87+
bold(red('corrupt the file')),
88+
normal(' or '),
89+
bold(red('cause data loss')),
90+
normal(', '),
91+
italic('be cautious'),
92+
normal('.'),
9093
],
9194
);
9295
}
@@ -97,14 +100,16 @@ class _FileExplorerCardState extends State<FileExplorerCard> {
97100
action,
98101
callback,
99102
message: [
100-
normal('This action '),
101-
bold('writes'),
102-
normal(' to this file, '),
103-
bold('it can '),
104-
bold(red('corrupt the file ')),
105-
normal('or'),
106-
bold(red(' even lose your data')),
107-
normal(', be cautious.'),
103+
normal('You are '),
104+
bold('deleting'),
105+
normal(' this folder, this is '),
106+
bold('not reversible'),
107+
normal(' and '),
108+
bold(red('can cause data loss ')),
109+
normal('or even'),
110+
bold(red(' corrupt some apps')),
111+
normal(' depending on which folder you are deleting, '),
112+
italic('be cautious.'),
108113
],
109114
);
110115
}

example/lib/widgets/text_field_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class _TextFieldDialogState extends State<TextFieldDialog> {
5151
),
5252
),
5353
actions: <Widget>[
54-
DangerButton(
54+
Button(
5555
'Cancel',
5656
onTap: () => Navigator.pop<String>(context),
5757
),

0 commit comments

Comments
 (0)