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

onClick area not correctelly defined #35

Open
kaessajidi opened this issue Jun 10, 2019 · 2 comments
Open

onClick area not correctelly defined #35

kaessajidi opened this issue Jun 10, 2019 · 2 comments

Comments

@kaessajidi
Copy link

kaessajidi commented Jun 10, 2019

onclick gesturedetector is not put at the right place . It should be moved before padding for better user experiance when clicking a selected tab. currently we struggle to click on a selected tab.

Line 153 to 159
`
child: Container(
child: AnimatedAlign(

          duration: Duration(milliseconds: ANIM_DURATION),

          curve: Curves.easeOut,

          alignment: Alignment(_circleAlignX, 1),

          child: GestureDetector(

            onTap: widget.tabs[currentSelected].onclick,

            child: Padding(

            padding: const EdgeInsets.only(bottom: 15),

            child: FractionallySizedBox(

              widthFactor: 1 / widget.tabs.length,

              child: Stack(

...
`

@kaessajidi
Copy link
Author

My suggestion didn't really solve the problem. The click on selected tab don't always work as expected. We need to click multiple time to make it work.

@crgmonroe
Copy link

I found this issue also. Debugging in the widget inspector, the _RawMouseRegion ends at the top of the icon rather than the top of the button. So the _RawMouseRegion starts at the top of the icon and carries down to the top of the widget title text.

This means the tap works correctly if you tap towards the bottom of the button. I was looking for a way to wrap this in a gesturedector of some sort to be able to control the tap region, but no luck yet.

Overall love the widget, just wish the tap area was configurable or covered the entire button.

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

2 participants