20 lines
468 B
Dart
Raw Normal View History

import 'package:hotkey_manager/hotkey_manager.dart';
import 'package:universal_platform/universal_platform.dart';
import '../startup.dart';
class HotKeyTask extends LaunchTask {
const HotKeyTask();
@override
Future<void> initialize(LaunchContext context) async {
2025-04-23 11:13:07 +08:00
await super.initialize(context);
// the hotkey manager is not supported on mobile
if (UniversalPlatform.isMobile) {
return;
}
await hotKeyManager.unregisterAll();
}
}