feat: flutter增加长按功能

This commit is contained in:
2026-07-14 14:25:58 +08:00
parent 2fdf3c3b9e
commit 37fccec6af
3 changed files with 64 additions and 0 deletions

View File

@@ -37,4 +37,12 @@ class ControlCommands {
'keyCode': keyCode,
'keyAction': action,
});
/// 长按指令。坐标 x/y 为相对于屏幕的百分比0.0 ~ 1.0)。
/// 对应 Android 端 RemoteTouchView.createLongPressCommand。
static String longPress(double x, double y) => jsonEncode({
'action': 'LONG_PRESS',
'x': x,
'y': y,
});
}