File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,37 @@ class _ProfilePageState extends State<ProfilePage> {
78
78
.toIso8601String ()
79
79
.replaceAll (RegExp (r'[-:]' ), '' )
80
80
.replaceAll (RegExp (r'\..*' ), '' );
81
- exportTasks (
82
- contents: tasks,
83
- suggestedName: 'tasks-$now .txt' ,
81
+
82
+ showDialog (
83
+ context: context,
84
+ builder: (BuildContext context) {
85
+ return AlertDialog (
86
+ title: const Text ("Export Format" ),
87
+ content: const Text ("Choose the export format:" ),
88
+ actions: < Widget > [
89
+ TextButton (
90
+ child: const Text ("JSON" ),
91
+ onPressed: () {
92
+ Navigator .of (context).pop ();
93
+ exportTasks (
94
+ contents: tasks,
95
+ suggestedName: 'tasks-$now .json' ,
96
+ );
97
+ },
98
+ ),
99
+ TextButton (
100
+ child: const Text ("TXT" ),
101
+ onPressed: () {
102
+ Navigator .of (context).pop ();
103
+ exportTasks (
104
+ contents: tasks,
105
+ suggestedName: 'tasks-$now .txt' ,
106
+ );
107
+ },
108
+ ),
109
+ ],
110
+ );
111
+ },
84
112
);
85
113
},
86
114
() {
You can’t perform that action at this time.
0 commit comments