2022-08-25 20:48:44 +00:00
|
|
|
import "package:dart_vlc/dart_vlc.dart";
|
2021-12-10 10:40:20 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-04-15 07:16:41 +00:00
|
|
|
import 'package:flutter/services.dart';
|
2021-12-10 10:40:20 +00:00
|
|
|
import 'package:openmediacentermobile/app.dart';
|
2021-12-10 23:01:44 +00:00
|
|
|
|
2022-08-28 20:51:12 +00:00
|
|
|
import 'db/database.dart';
|
2021-12-11 12:33:46 +00:00
|
|
|
import 'log/log.dart';
|
2021-12-10 23:01:44 +00:00
|
|
|
import 'login/logincontext.dart';
|
2022-04-15 07:16:41 +00:00
|
|
|
import 'platform.dart';
|
2021-12-10 10:40:20 +00:00
|
|
|
|
2022-04-15 07:16:41 +00:00
|
|
|
void main() async {
|
2021-12-11 12:33:46 +00:00
|
|
|
Log.i("App init!");
|
2022-04-15 18:19:09 +00:00
|
|
|
DartVLC.initialize();
|
2022-04-15 07:16:41 +00:00
|
|
|
if (isDesktop()) {
|
|
|
|
} else {
|
|
|
|
await loadDeviceInfo();
|
|
|
|
}
|
|
|
|
|
2022-08-28 20:51:12 +00:00
|
|
|
Db().init();
|
|
|
|
|
2022-04-15 07:16:41 +00:00
|
|
|
// 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
|
|
|
}
|