feat: Add theme customization options in settings screen and update app theme logic

This commit is contained in:
2026-05-18 21:23:55 +02:00
parent beadf860e2
commit e80ae52c08
3 changed files with 168 additions and 13 deletions
+10 -5
View File
@@ -1,17 +1,22 @@
import 'package:flutter/material.dart';
class AppTheme {
static ThemeData get theme {
static ThemeData theme({Color seedColor = Colors.amber}) {
final Brightness foregroundBrightness =
ThemeData.estimateBrightnessForColor(seedColor);
final Color foregroundColor =
foregroundBrightness == Brightness.dark ? Colors.white : Colors.black;
return ThemeData(
useMaterial3: true,
scaffoldBackgroundColor: const Color.fromRGBO(31, 32, 33, 1),
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.amber,
seedColor: seedColor,
brightness: Brightness.dark,
),
floatingActionButtonTheme: const FloatingActionButtonThemeData(
backgroundColor: Colors.amber,
foregroundColor: Colors.black,
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: seedColor,
foregroundColor: foregroundColor,
),
);
}