Files
lunasea/lib/main.dart
Jagandeep Brar 8ac4228e56 [Release] v2.1.0 (66) (#200)
* [Icon] Removed alpha channel from icon
* [Sonarr] Fixed toast for season monitoring toggle
* [Settings] Completely redesign, prepping for user configurable options
* [Browsers] Ability to set which browser
* [Settings/Modules] Long pressing 'Open Links In...' would open LunaSea website
* [Navigation Bar] Fixed title regression
* [Sliver AppBar] Defaults to collapsed, pull down to view
* [Sliver AppBar] Left align title
* [Settings/Calendar] Ability to configure starting day and starting size
* [Settings] Added headers
* [Settings] Cleaned folder structure of widgets
* [Calendar] Added option to disable specific modules
* [Theme] added AMOLED black theme
* [Android] Build Configuration for Android (#198)
* [Android] Implemented WIP android build configuration
* [Android] Added splash, icons, dynamic platform-specific text
* [Android] Added signing configuration, updated minimum version to Android 7.0
* [README] Updated README to reflect Android building
* [README] Added stub Google Play shield
* [README] Reordered shields
2020-04-20 10:12:16 -05:00

42 lines
1.3 KiB
Dart

import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:lunasea/core.dart';
void main() async {
_init();
Logger.initialize();
await Database.initialize();
runZonedGuarded<Future<void>>(
() async => runApp(_BIOS()),
(Object error, StackTrace stack) => Logger.fatal(error, stack),
);
}
void _init() {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
systemNavigationBarColor: Colors.black,
systemNavigationBarDividerColor: Colors.black,
statusBarColor: Colors.transparent,
));
}
class _BIOS extends StatelessWidget {
@override
Widget build(BuildContext context) => Providers.providers(
child: ValueListenableBuilder(
valueListenable: Database.lunaSeaBox.listenable(keys: [LunaSeaDatabaseValue.THEME_AMOLED.key]),
builder: (context, box, _) {
return MaterialApp(
title: 'LunaSea',
debugShowCheckedModeBanner: false,
routes: Routes.getRoutes(),
darkTheme: Themes.getDarkTheme(),
theme: Themes.getDarkTheme(),
);
}
),
);
}