sooxt98 / google_nav_bar

A modern google style nav bar for flutter.
MIT License
749 stars 114 forks source link

RenderFlex overflow when adding 6 tabs #12

Closed trademunch closed 4 years ago

trademunch commented 4 years ago

Unable to add 6 tabs, Gives RenderFlex overflow at right side.

Please suggest so that the space between the tabs can be decreased and 6 tabs can be added easily.

sooxt98 commented 4 years ago

U need to decrease the padding and gap for the Gbutton or make the text smaller , so do u have example screenshot or code for the overflow?

trademunch commented 4 years ago

Image 1: https://www.dropbox.com/s/sz9wk4jsi38bmfb/image_1.jpg?dl=0

Image 2: https://www.dropbox.com/s/jb1pxar7vxfnc07/image_2.jpg?dl=0

In case I decreased the gap and padding for GNav it comes like this, but the last tab has 2 words in it, which again makes it overflow.

Updated the below code:

GNav( gap: 5, activeColor: Colors.white, iconSize: 24, padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5), duration: Duration(milliseconds: 800), tabBackgroundColor: Colors.grey[800], )

sooxt98 commented 4 years ago

U need to either cut off the text, or decrease the ‘tabMargin’, ‘gap’, and ‘padding’; the last solution is making the font smaller with ‘textStyle’.

trademunch commented 4 years ago

Thanks for the help, I had to cut short the text and decrease text size as per your suggestion. Closing the issue!