2021-09-23 19:25:03 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:keyboard_dismisser/keyboard_dismisser.dart';
|
|
|
|
|
|
|
|
import 'l10n/l10n.dart';
|
|
|
|
import 'pages/home_page.dart';
|
2022-01-06 15:28:42 +01:00
|
|
|
import 'resources/theme.dart';
|
2021-10-31 12:52:58 +01:00
|
|
|
import 'stores/config_store.dart';
|
|
|
|
import 'util/observer_consumers.dart';
|
2021-09-23 19:25:03 +02:00
|
|
|
|
2021-10-31 12:52:58 +01:00
|
|
|
class MyApp extends StatelessWidget {
|
2021-09-23 19:25:03 +02:00
|
|
|
const MyApp();
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return KeyboardDismisser(
|
2021-10-31 12:52:58 +01:00
|
|
|
child: ObserverBuilder<ConfigStore>(
|
|
|
|
builder: (context, store) => MaterialApp(
|
|
|
|
title: 'lemmur',
|
|
|
|
supportedLocales: L10n.supportedLocales,
|
|
|
|
localizationsDelegates: L10n.localizationsDelegates,
|
|
|
|
themeMode: store.theme,
|
|
|
|
darkTheme: store.amoledDarkMode ? amoledTheme : darkTheme,
|
|
|
|
locale: store.locale,
|
|
|
|
theme: lightTheme,
|
|
|
|
home: const HomePage(),
|
|
|
|
),
|
2021-09-23 19:25:03 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|