Skip to content

Use InkResponse instead of GestureDetector #75

@clragon

Description

@clragon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions