touch screen input

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow
2023-07-17 20:07:55 +08:00
parent 77eca6bcdc
commit c01c8d0afc
6 changed files with 354 additions and 153 deletions

View File

@@ -268,6 +268,14 @@ class InputModel {
sendMouse('up', button);
}
void tapDown(MouseButtons button) {
sendMouse('down', button);
}
void tapUp(MouseButtons button) {
sendMouse('up', button);
}
/// Send scroll event with scroll distance [y].
void scroll(int y) {
bind.sessionSendMouse(
@@ -429,7 +437,7 @@ class InputModel {
}
void onPointDownImage(PointerDownEvent e) {
debugPrint("onPointDownImage");
debugPrint("onPointDownImage ${e.kind}");
_stopFling = true;
if (e.kind != ui.PointerDeviceKind.mouse) {
if (isPhysicalMouse.value) {
@@ -469,6 +477,7 @@ class InputModel {
} else if (dy < 0) {
dy = 1;
}
debugPrint('REMOVE ME ================== onPointerSignalImage');
bind.sessionSendMouse(
sessionId: sessionId,
msg: '{"type": "wheel", "x": "$dx", "y": "$dy"}');