Settings, correção de light/darkmode do dispositivo (e adição da escolha entre modos nas settings) e correção do tipo de letra no textfield do chatbot
This commit is contained in:
@@ -4,6 +4,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'core/theme/app_theme.dart';
|
||||
import 'core/routing/app_router.dart';
|
||||
import 'core/services/firebase/firebase_service.dart';
|
||||
import 'core/providers/theme_provider.dart';
|
||||
import 'l10n/app_localizations.dart';
|
||||
|
||||
void main() async {
|
||||
@@ -15,17 +16,19 @@ void main() async {
|
||||
runApp(const ProviderScope(child: MyApp()));
|
||||
}
|
||||
|
||||
class MyApp extends StatelessWidget {
|
||||
class MyApp extends ConsumerWidget {
|
||||
const MyApp({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final themeMode = ref.watch(themeProvider);
|
||||
|
||||
return MaterialApp.router(
|
||||
title: 'AI Study Assistant',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: AppTheme.lightTheme,
|
||||
darkTheme: AppTheme.darkTheme,
|
||||
themeMode: ThemeMode.system,
|
||||
themeMode: themeMode, // Use theme from provider (currently always light)
|
||||
routerConfig: AppRouter.router,
|
||||
|
||||
// Internationalization configuration
|
||||
|
||||
Reference in New Issue
Block a user