662ee55e1d
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
48 lines
1.4 KiB
Dart
48 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
|
|
import 'l10n/gen/app_localizations.dart';
|
|
import 'state/providers.dart';
|
|
import 'ui/screens/splash_screen.dart';
|
|
|
|
class BlockSeasonsApp extends ConsumerStatefulWidget {
|
|
const BlockSeasonsApp({super.key});
|
|
|
|
@override
|
|
ConsumerState<BlockSeasonsApp> createState() => _BlockSeasonsAppState();
|
|
}
|
|
|
|
class _BlockSeasonsAppState extends ConsumerState<BlockSeasonsApp> {
|
|
@override
|
|
void initState() {
|
|
super.initState();
|
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
ref.read(consentServiceProvider).ensureConsentAndInitialize();
|
|
});
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return MaterialApp(
|
|
onGenerateTitle: (context) => AppLocalizations.of(context)!.appTitle,
|
|
debugShowCheckedModeBanner: false,
|
|
localizationsDelegates: const [
|
|
AppLocalizations.delegate,
|
|
GlobalMaterialLocalizations.delegate,
|
|
GlobalWidgetsLocalizations.delegate,
|
|
GlobalCupertinoLocalizations.delegate,
|
|
],
|
|
supportedLocales: const [Locale('en'), Locale('ko')],
|
|
theme: ThemeData(
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: const Color(0xFF5B7FFF),
|
|
brightness: Brightness.dark,
|
|
),
|
|
useMaterial3: true,
|
|
),
|
|
home: const SplashScreen(),
|
|
);
|
|
}
|
|
}
|