The snackbar error text was not user friendly and hard to read.

The text color was white, which made it difficult to read against
the low-saturation red background. To fix this, the background
color was updated to use the `error` color, and the text color was
updated to use the `onError` color from the Material baseline
color scheme.

Signed-off-by: Shan Shaji <[email protected]>
---
 lib/widgets/proxmox_stream_builder_widget.dart | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/widgets/proxmox_stream_builder_widget.dart 
b/lib/widgets/proxmox_stream_builder_widget.dart
index a346b37..efcbd63 100644
--- a/lib/widgets/proxmox_stream_builder_widget.dart
+++ b/lib/widgets/proxmox_stream_builder_widget.dart
@@ -31,9 +31,11 @@ class _ProxmoxBaseStreamBuilderState<B extends 
ProxmoxBaseBloc<dynamic, S>,
             SnackBar(
               content: Text(
                 newState.errorMessage,
-                style: ThemeData.dark().textTheme.labelLarge,
+                style: Theme.of(context).textTheme.labelLarge?.copyWith(
+                  color: Theme.of(context).colorScheme.onError,
+                ),
               ),
-              backgroundColor: ThemeData.dark().colorScheme.error,
+              backgroundColor: Theme.of(context).colorScheme.error,
             ),
           );
         }
-- 
2.47.3



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to