dragTo method Null safety
- {required int x,
- required int y,
- Duration? duration,
- MouseTween? tween,
- MouseButton? button}
drags mouse cursor to a certain position ,
returns Future<void>
Implementation
static Future<void> dragTo({
required int x,
required int y,
Duration? duration,
MouseTween? tween,
MouseButton? button,
}) async {
await Process.run('python3', [
mPath,
'drag_to',
x.toString(),
y.toString(),
duration != null ? duration.inSeconds.toString() : '0',
_mapTween(tween),
_mapButton(button),
]);
}