From 79249c418d8c20d0e748be770904ddac7bbd06ed Mon Sep 17 00:00:00 2001 From: Connor Frank Date: Mon, 1 Apr 2024 23:45:43 -0400 Subject: Themes, contexts, lots of changes --- lib/main.dart | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'lib/main.dart') diff --git a/lib/main.dart b/lib/main.dart index e19de54..39a7f05 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,9 +16,40 @@ class MiniGolfScoreApp extends StatelessWidget { @override Widget build(BuildContext context) { - return const MaterialApp( + return MaterialApp( + theme: ThemeData( + brightness: Brightness.light, + primarySwatch: Colors.blue, // Example primary color for light theme + scaffoldBackgroundColor: Colors.white, // Light mode background color + // Define other theme properties for light mode + elevatedButtonTheme: ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.blue, // Button color for light mode + foregroundColor: Colors.black, // Text color for light mode + ), + ), + ), + darkTheme: ThemeData( + brightness: Brightness.dark, + primarySwatch: Colors.blueGrey, // Example primary color for dark theme + scaffoldBackgroundColor: Colors.black, // Dark mode background color + textTheme: const TextTheme( + bodyLarge: TextStyle(color: Colors.white), + bodyMedium: TextStyle(color: Colors.white), + bodySmall: TextStyle(color: Colors.white), + // Add other text styles as needed + ), + // Define other theme properties for dark mode + elevatedButtonTheme: ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + backgroundColor: Colors.blueGrey, // Button color for dark mode + foregroundColor: Colors.white, // Text color for dark mode + ), + ), + ), + themeMode: ThemeMode.system, // Use the system theme setting (light/dark) title: 'Mini Golf Score App', - home: MainMenu(), + home: const MainMenu(), ); } } -- cgit v1.2.3