mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Add theme selection to settings page
Adds a dropdown in the settings page to switch between available themes (Catppuccin Mocha, Gruvbox Dark). The selected theme is applied immediately on save and persisted across restarts via SharedPreferences. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
527e2bd6c8
commit
a647e0d061
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../theme/app_colors.dart';
|
||||
|
||||
class UISnackbars {
|
||||
static void showError(BuildContext context, String message) {
|
||||
@@ -16,15 +17,16 @@ class UISnackbars {
|
||||
}
|
||||
|
||||
static void showSuccess(BuildContext context, String message) {
|
||||
final appColors = Theme.of(context).extension<AppColorExtension>()!;
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
message,
|
||||
style: TextStyle(color: Theme.of(context).colorScheme.onPrimary),
|
||||
style: TextStyle(color: appColors.onSuccess),
|
||||
),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
showCloseIcon: true,
|
||||
backgroundColor: Colors.lightGreen,
|
||||
backgroundColor: appColors.success,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user