tunitowen / fancy_bottom_navigation

Flutter plugin - FancyBottomNavigation
Apache License 2.0
773 stars 187 forks source link

onClick area not correctelly defined #35

Open kaessajidi opened 5 years ago

kaessajidi commented 5 years ago

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 commented 5 years ago

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 commented 2 years ago

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.