mirror of
https://github.com/Dvorinka/1356.git
synced 2026-06-03 19:42:57 +00:00
38 lines
895 B
Dart
38 lines
895 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
import 'bootstrap/bootstrap.dart';
|
|
import 'core/theme/app_theme.dart';
|
|
import 'core/routing/app_router.dart';
|
|
import 'core/state/providers.dart';
|
|
|
|
void main() async {
|
|
WidgetsFlutterBinding.ensureInitialized();
|
|
|
|
await bootstrap();
|
|
|
|
runApp(
|
|
const ProviderScope(
|
|
child: LifeTimerApp(),
|
|
),
|
|
);
|
|
}
|
|
|
|
class LifeTimerApp extends ConsumerWidget {
|
|
const LifeTimerApp({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
final router = ref.watch(appRouterProvider);
|
|
final themeMode = ref.watch(themeModeProvider);
|
|
|
|
return MaterialApp.router(
|
|
title: 'LifeTimer',
|
|
debugShowCheckedModeBanner: false,
|
|
theme: AppTheme.light,
|
|
darkTheme: AppTheme.dark,
|
|
themeMode: themeMode,
|
|
routerConfig: router,
|
|
);
|
|
}
|
|
}
|