OpenMediacenterMobileFlutter/lib/main.dart

39 lines
1.3 KiB
Dart
Raw Normal View History

import "package:dart_vlc/dart_vlc.dart";
2021-12-10 10:40:20 +00:00
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
2021-12-10 10:40:20 +00:00
import 'package:openmediacentermobile/app.dart';
import 'db/database.dart';
import 'log/log.dart';
import 'login/logincontext.dart';
import 'platform.dart';
2021-12-10 10:40:20 +00:00
void main() async {
Log.i("App init!");
2022-04-15 18:19:09 +00:00
DartVLC.initialize();
if (isDesktop()) {
} else {
await loadDeviceInfo();
}
Db().init();
// RawKeyboard.instance.addListener((event) {
// if (LogicalKeyboardKey.arrowLeft == event.logicalKey) {
// FocusManager.instance.primaryFocus?.focusInDirection(TraversalDirection.left);
// } else if (LogicalKeyboardKey.arrowRight == event.logicalKey) {
// FocusManager.instance.primaryFocus?.focusInDirection(TraversalDirection.right);
// } else if (LogicalKeyboardKey.arrowDown == event.logicalKey) {
// FocusManager.instance.primaryFocus?.focusInDirection(TraversalDirection.down);
// } else if (LogicalKeyboardKey.arrowUp == event.logicalKey) {
// FocusManager.instance.primaryFocus?.focusInDirection(TraversalDirection.up);
// }
// });
runApp(Shortcuts(shortcuts: <LogicalKeySet, Intent>{
LogicalKeySet(LogicalKeyboardKey.select): ActivateIntent(),
}, child: const LoginContainer(child: App())));
// runApp(const LoginContainer(child: App()));
2021-12-10 10:40:20 +00:00
}