File tree Expand file tree Collapse file tree 1 file changed +35
-1
lines changed
Expand file tree Collapse file tree 1 file changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -159,9 +159,43 @@ class _ManageTaskServerState extends State<ManageTaskServer> {
159159 // Dismiss the loading dialog
160160 Navigator .of (context).pop ();
161161
162+ //Displaying Error message.
163+ showDialog (
164+ context: context,
165+ builder: (context) => Utils .showAlertDialog (
166+ shape: RoundedRectangleBorder (
167+ borderRadius: BorderRadius .circular (
168+ 20 ), // Adjust the radius as needed
169+ ),
170+ actionsPadding: const EdgeInsets .all (5 ),
171+ title: Text (
172+ "Error" ,
173+ style: TextStyle (color: TaskWarriorColors .red),
174+ ),
175+ content: Text (
176+ trace.toString ().startsWith ("#0" )
177+ ? "Please set up your Task Server."
178+ : e.toString (),
179+ style: TextStyle (
180+ color: AppSettings .isDarkMode
181+ ? TaskWarriorColors .white
182+ : TaskWarriorColors .black,
183+ ),
184+ ),
185+ actions: < Widget > [
186+ TextButton (
187+ onPressed: () {
188+ Navigator .pop (context);
189+ },
190+ child: Text (
191+ "OK" ,
192+ style: TextStyle (color: TaskWarriorColors .grey),
193+ ),
194+ )
195+ ]));
196+
162197 // Log the error and trace
163198 logError (e, trace);
164-
165199 // Refresh the state of ProfilesWidget
166200 ProfilesWidget .of (context).setState (() {});
167201 }
You can’t perform that action at this time.
0 commit comments