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:
2026-05-11 21:47:15 +01:00
parent 9faab9b74e
commit b7988eb608
13 changed files with 1342 additions and 59 deletions

View File

@@ -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