2

Is it possible to set the position of the mouse cursor using Flutter for desktop?

I'm sure this is possible using custom plugins, but I'm hoping for a cross-platform Dart solution or an existing plugin.

Md. Yeasin Sheikh
  • 54,221
  • 7
  • 29
  • 56
Joshua Wade
  • 4,755
  • 2
  • 24
  • 44
  • have you found any way to set the pointer position on the Windows desktop in Flutter? – Karan Singla Mar 09 '23 at 20:41
  • 1
    @KaranSingla It looks like there's a package that provides direct access to some win32 APIs, including the one for setting the mouse cursor: https://pub.dev/documentation/dart_winapi/latest/user32/SetCursorPos.html - I haven't tested this, but it's something to try. – Joshua Wade Mar 09 '23 at 21:12

2 Answers2

2

There is no such functionality built into Flutter.

Vraj Shah
  • 536
  • 2
  • 7
  • 19
-1

Make a method channel between and call SetCursorPos function on cpp file.

SetCursorPos(int x, int y)
Karan Singla
  • 178
  • 3
  • 8