Make selectable text mouse cursor configurable#125133
Make selectable text mouse cursor configurable#125133auto-submit[bot] merged 3 commits intoflutter:masterfrom
Conversation
dce745e to
80711d5
Compare
80711d5 to
0978640
Compare
|
Nice work! However there are quite a few components with clickable parts that include text. These include:
Rather than handle these individually, can we add it a level below, say to |
I agree with this. Let me try to update this PR. |
8302a39 to
e66a9b3
Compare
guidezpl
left a comment
There was a problem hiding this comment.
Nice, please update PR description.
_ ___ _____ __ __
| | / __|_ _| \/ |
| |_| (_ | | | | |\/| |
|____\___| |_| |_| |_|
There was a problem hiding this comment.
| /// The [MouseCursor] for mouse pointers that are hovering over selectable | |
| /// Text widgets. | |
| /// The [MouseCursor] for mouse pointers hovering over selectable [Text] widgets. |
There was a problem hiding this comment.
e66a9b3 to
2a86178
Compare
|
Thanks for fix. On which channel and which version this fix is available? |
|
This fix is available on the master channel. |
|
pro tip: d4f884e indicates the branches the merge commit is present on |
|
Thanks for the fix. Is it also available in stable or only on master? |
|
As long as stable isn't listed on that commit, it's not available. Since beta releases are monthly, expect it in the next one. |
|
@guidezpl still not available on stable? |
|
@LucaIaconelli I see that is present in stable from version https://docs.flutter.dev/release/release-notes/release-notes-3.13.0 |
|
For future reference (both for myself and others), here's an example of how this output can be utilized effectively: SelectionArea(
child: DefaultSelectionStyle.merge(
mouseCursor: SystemMouseCursors.click,
child: Text('Clickable and selectable text'),
),
); |

Description
This PR introduces
DefaultSelectionStyle.mouseCursorto configure the mouse cursor over selectable text.It also applies this solution to
InkResponseto make the mouse cursor win over the default one provided by selectableTextfor many Material components (such as buttons).Before
Before.mov
After
After.mov
Related Issue
Fixes #104595
Tests
Adds 6 tests.