long press for drag

This commit is contained in:
open-trade 2020-11-25 21:15:06 +08:00
parent 7a2d687367
commit 8583b6b140

View File

@ -178,6 +178,17 @@ class _RemotePageState extends State<RemotePage> {
if (_drag || _scroll) return;
FFI.tap(_right);
},
onLongPressStart: (_) {
if (_drag) {
// case: to show password on windows
FFI.sendMouse('down', 'left');
}
},
onLongPressEnd: (_) {
if (_drag) {
FFI.sendMouse('up', 'left');
}
},
onScaleStart: (details) {
_scale = 1;
_xOffset = details.focalPoint.dx;