2023-12-27 11:11:14 +08:00
|
|
|
import 'package:flutter/foundation.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
2024-09-12 14:40:19 +08:00
|
|
|
import 'package:universal_platform/universal_platform.dart';
|
2023-12-27 11:11:14 +08:00
|
|
|
|
|
|
|
import '../startup.dart';
|
|
|
|
|
|
|
|
class DebugTask extends LaunchTask {
|
|
|
|
const DebugTask();
|
|
|
|
|
|
|
|
@override
|
|
|
|
Future<void> initialize(LaunchContext context) async {
|
|
|
|
// the hotkey manager is not supported on mobile
|
2024-09-12 14:40:19 +08:00
|
|
|
if (UniversalPlatform.isMobile && kDebugMode) {
|
2024-01-29 10:26:45 +08:00
|
|
|
await SystemChannels.textInput.invokeMethod('TextInput.hide');
|
2023-12-27 11:11:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Future<void> dispose() async {}
|
|
|
|
}
|