feat: flutter优化滑动不跟手
This commit is contained in:
@@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user