From 4b7571b54359354e4dc1b944820543959d9f4f91 Mon Sep 17 00:00:00 2001 From: Pavel Date: Sun, 9 Jun 2024 19:25:34 +0530 Subject: [PATCH] Update UI for fetching statistics dialog --- lib/taskserver/ntaskserver.dart | 39 +++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/lib/taskserver/ntaskserver.dart b/lib/taskserver/ntaskserver.dart index ec6a2a96..0dfc75ee 100644 --- a/lib/taskserver/ntaskserver.dart +++ b/lib/taskserver/ntaskserver.dart @@ -79,13 +79,27 @@ class _ManageTaskServerState extends State { barrierDismissible: false, builder: (context) { return Utils.showAlertDialog( - title: const Text('Fetching statistics...'), - content: const Column( + title: Text( + 'Fetching statistics...', + style: TextStyle( + color: AppSettings.isDarkMode + ? TaskWarriorColors.white + : TaskWarriorColors.black, + ), + ), + content: Column( mainAxisSize: MainAxisSize.min, children: [ - CircularProgressIndicator(), - SizedBox(height: 16), - Text('Please wait...'), + const CircularProgressIndicator(), + const SizedBox(height: 16), + Text( + 'Please wait...', + style: TextStyle( + color: AppSettings.isDarkMode + ? TaskWarriorColors.white + : TaskWarriorColors.black, + ), + ), ], ), ); @@ -140,6 +154,13 @@ class _ManageTaskServerState extends State { ), actions: [ ElevatedButton( + style: ButtonStyle( + backgroundColor: WidgetStateProperty.all( + AppSettings.isDarkMode + ? TaskWarriorColors.kLightSecondaryBackgroundColor + : TaskWarriorColors.ksecondaryBackgroundColor, + ), + ), onPressed: () { Navigator.of(context).pop(); }, @@ -147,8 +168,8 @@ class _ManageTaskServerState extends State { 'Ok', style: TextStyle( color: AppSettings.isDarkMode - ? TaskWarriorColors.white - : TaskWarriorColors.black, + ? TaskWarriorColors.black + : TaskWarriorColors.white, ), ), ), @@ -505,10 +526,10 @@ class _ManageTaskServerState extends State { style: ButtonStyle( backgroundColor: AppSettings .isDarkMode - ? MaterialStateProperty.all< + ? WidgetStateProperty.all< Color>( TaskWarriorColors.black) - : MaterialStateProperty.all< + : WidgetStateProperty.all< Color>( TaskWarriorColors .white)),