Skip to content
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

Use InkResponse instead of GestureDetector #75

Open
clragon opened this issue Dec 4, 2022 · 0 comments
Open

Use InkResponse instead of GestureDetector #75

clragon opened this issue Dec 4, 2022 · 0 comments

Comments

@clragon
Copy link

clragon commented Dec 4, 2022

I believe, LikeButton should use InkResponse instead of GestureDetector inside the code here. The InkResponse can then also use the appropriate HoverColor and HighlightColor.

This can also be seen in Twitters design:
8lvvMWYiXm

This would also provide changing the Cursor automatically on hover, on Desktop / Web.

To perfectly recreate the Twitter behaviour, a custom InkHighlight and a MouseRegion might be needed, instead of InkResponse.

Furthermore, I believe that if onTap is null, the LikeButton should be disabled.
the Icon and Text inside of the LikeButton should then change its Color to a disabled state.
It would be nice if LikeButton had its own ButtonStyle, with appropriate MaterialStateProperty like other buttons.

This would help to make LikeButton feel more like official Flutter widgets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant