OpenMediacenterMobileFlutter/lib/main.dart

30 lines
747 B
Dart

import 'package:flutter/foundation.dart';
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';
import 'login/login_container.dart';
import 'utils/platform.dart';
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())));
}