Flutter-desktop-embedding: Support cursor changes

Created on 13 May 2019  路  6Comments  路  Source: google/flutter-desktop-embedding

Requesting here since it should probably be a plugin first, let me know if I should move it. There should be a way to change the displayed mouse cursor in an FDE app,

  • imperatively, by calling a function akin to setCursor(Cursors.pointer)
  • inline in the Widget tree, with something akin to
    dart CursorWidget( cursor: Cursors.loading, child: MaterialButton(...) );

The first one is more important since we already have Listener.

os-linux os-macos os-windows

Most helpful comment

All 6 comments

See also https://github.com/flutter/flutter/issues/31952

I think the way to proceed would be to first implement that issue, and then see if there are common use cases that go beyond what's needed for the built-in cursor behavior that may be useful to prototype as a plugin.

Ah, didn't see that - thanks! Feel free to close or leave open as needed.

Since core cursor support has landed in the framework and can easily be implemented in the desktop embeddings (macOS is already done), closing this. The remaining work is custom cursors, but I don't see a need for that to be done here vs in Flutter itself at this stage.

@stuartmorgan were can I find more about the implementation? I'm trying to set the cursor on macOS, but I can't see anything about how to achieve this.

There are links to various parts of the implementation in https://github.com/flutter/flutter/issues/31952.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Syleron picture Syleron  路  5Comments

YazeedAlKhalaf picture YazeedAlKhalaf  路  5Comments

stuartmorgan picture stuartmorgan  路  10Comments

vanlooverenkoen picture vanlooverenkoen  路  3Comments

zhujintao picture zhujintao  路  3Comments