- App widget with MaterialApp.router, theme/darkTheme from AppTheme, themeMode from ThemeNotifier - German localization delegates configured, debug banner disabled - main.dart wraps App in ProviderScope with ensureInitialized - All 16 tests pass, dart analyze clean, flutter build apk succeeds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
28 lines
892 B
Dart
28 lines
892 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'package:household_keeper/core/router/router.dart';
|
|
import 'package:household_keeper/core/theme/app_theme.dart';
|
|
import 'package:household_keeper/core/theme/theme_provider.dart';
|
|
import 'package:household_keeper/l10n/app_localizations.dart';
|
|
|
|
class App extends ConsumerWidget {
|
|
const App({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final themeMode = ref.watch(themeProvider);
|
|
|
|
return MaterialApp.router(
|
|
routerConfig: router,
|
|
theme: AppTheme.lightTheme(),
|
|
darkTheme: AppTheme.darkTheme(),
|
|
themeMode: themeMode,
|
|
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
|
supportedLocales: const [Locale('de')],
|
|
locale: const Locale('de'),
|
|
debugShowCheckedModeBanner: false,
|
|
);
|
|
}
|
|
}
|