2

By default, on Desktop, btns in flutter change the Mouse Cursor when they are disabled:

enter image description here

We'd like to disable this behavior, or replace with a different cursor.

shawnblais
  • 1,038
  • 11
  • 23

1 Answers1

5

To override the default disabledMouseCursor for ElevatedButton, TextButton or OutlinedButton, one could write:

        ElevatedButton(
          style: ElevatedButton.styleFrom(
            disabledMouseCursor: SystemMouseCursors.basic,
          ),
          // ...
        )

See ButtonStyle class for more information.

Spatz
  • 18,640
  • 7
  • 62
  • 66