From 317abbdc8e1661d78bf5949925cef88eb1e7b202 Mon Sep 17 00:00:00 2001 From: fbachus Date: Sun, 9 Aug 2026 14:43:31 +0200 Subject: [PATCH] feat(ui): add dark theme --- lib/main.dart | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/main.dart b/lib/main.dart index 7ff8eaa..447ad25 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -27,8 +27,14 @@ class MyApp extends StatelessWidget { return MaterialApp( title: 'Oeffimaster', theme: ThemeData( - colorScheme: .fromSeed(seedColor: Colors.yellow), + brightness: Brightness.light, + colorSchemeSeed: Colors.yellow, ), + darkTheme: ThemeData( + brightness: Brightness.dark, + colorSchemeSeed: Colors.yellow, + ), + themeMode: ThemeMode.system, // home: const MyHomePage(title: 'Oeffimaster'), //this is what matters home: const JourneyOverviewPage(), // routes: { @@ -108,6 +114,8 @@ class _MyHomePageState extends State { ), ), floatingActionButton: FloatingActionButton( + backgroundColor: Theme.of(context).colorScheme.primaryContainer, + foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer, onPressed: () { Navigator.push( context, @@ -366,6 +374,8 @@ class _ChooseDeparturePageState extends State { ), ), floatingActionButton: FloatingActionButton( + backgroundColor: Theme.of(context).colorScheme.primaryContainer, + foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer, onPressed: () { if (widget.journeyId != null) { loadJourney(widget.journeyId as int); @@ -770,6 +780,8 @@ class _JourneyOverviewPageState extends State { ), ), floatingActionButton: FloatingActionButton( + backgroundColor: Theme.of(context).colorScheme.primaryContainer, + foregroundColor: Theme.of(context).colorScheme.onPrimaryContainer, onPressed: () { Navigator.push( context,