feat: flutter优化滑动不跟手

This commit is contained in:
2026-07-14 20:55:30 +08:00
parent 5cc47f9fb3
commit 3e46e1e4f3
4 changed files with 62 additions and 10 deletions

View File

@@ -45,4 +45,13 @@ class ControlCommands {
'x': x,
'y': y,
});
/// 原始 MotionEvent 指令,用于实现“实时跟手”。
/// action: 0=DOWN, 1=UP, 2=MOVE对应 Android MotionEvent.ACTION_XXX
static String motionEvent(int action, double x, double y) => jsonEncode({
'action': 'MOTION_EVENT',
'motionAction': action,
'x': x,
'y': y,
});
}