-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Make selectable text mouse cursor configurable #125133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make selectable text mouse cursor configurable #125133
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, please update PR description.
_ ___ _____ __ __
| | / __|_ _| \/ |
| |_| (_ | | | | |\/| |
|____\___| |_| |_| |_|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
|
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.