feat(ground-suite): add theme selector
This commit is contained in:
1 parent
eb6a343983
commit
c67d553076
6 files changed
+66
-3
No files matched your search
@@ -1,19 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'app_shell.dart';
|
||||
import 'theme.dart';
|
||||
import 'theme_mode_controller.dart';
|
||||
|
||||
class GroundSuiteApp extends StatelessWidget {
|
||||
class GroundSuiteApp extends ConsumerWidget {
|
||||
const GroundSuiteApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return MaterialApp(
|
||||
title: 'Ground Suite',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: groundSuiteLightTheme(),
|
||||
darkTheme: groundSuiteDarkTheme(),
|
||||
themeMode: ThemeMode.system,
|
||||
themeMode: ref.watch(themeModeProvider),
|
||||
home: const AppShell(),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user