OpenMediacenterMobileFlutter/lib/main.dart

30 lines
747 B
Dart
Raw Permalink Normal View History

import 'package:flutter/foundation.dart';
2021-12-10 10:40:20 +00:00
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:media_kit/media_kit.dart';
import 'app.dart';
import 'db/database.dart';
import 'log/log.dart';
2022-09-02 16:42:38 +00:00
import 'login/login_container.dart';
import 'utils/platform.dart';
2021-12-10 10:40:20 +00:00
void main() async {
Log.i("App init!");
WidgetsFlutterBinding.ensureInitialized();
MediaKit.ensureInitialized();
if (!kIsWeb && !isDesktop()) {
Log.i("init device info");
await loadDeviceInfo();
}
Log.i("Mediakit initialized");
await Db().init();
runApp(Shortcuts(shortcuts: <LogicalKeySet, Intent>{
LogicalKeySet(LogicalKeyboardKey.select): ActivateIntent(),
}, child: const LoginContainer(child: App())));
2021-12-10 10:40:20 +00:00
}