hacktons / convex_bottom_bar

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.
https://bar.hacktons.cn
Apache License 2.0
801 stars 150 forks source link

How can I center vertically the items? #179

Open ousvat opened 2 years ago

ousvat commented 2 years ago

How can I center the items vertically? I gave a significant height to the navigation bar but the items are sticked to bottom.

Here is how it looks: image

avenwu commented 2 years ago

post with screenshots please

ousvat commented 2 years ago

post with screenshots please

I updated the question.

avenwu commented 2 years ago

Since each tab can have different visual height, the default alignment of tabs are set as center vertical or align bottom. In your case I guess your are using TabStyle.react.

You may switch to this brunch temporary.

https://github.com/hacktons/convex_bottom_bar/pull/new/feature-alignment

RenatoMoratto commented 1 year ago

How can I center the items vertically? I gave a significant height to the navigation bar but the items are sticked to bottom.

Here is how it looks: image

I'm having the same issue, the navbar height is set to 80 and items are stuck at the bottom. That feature would be very helpful. Here is how it looks: WhatsApp Image 2023-01-24 at 11 58 31

RomanSoviak commented 1 year ago

Any updates?

RenatoMoratto commented 1 year ago

Sorry, I forgot to give my feedback here, but this approach worked for me.

Since each tab can have different visual height, the default alignment of tabs are set as center vertical or align bottom. In your case I guess your are using TabStyle.react.

You may switch to this brunch temporary.

https://github.com/hacktons/convex_bottom_bar/pull/new/feature-alignment

This is how I added the dependency:

 convex_bottom_bar:
    git:
      url: git@github.com:hacktons/convex_bottom_bar.git
      ref: `feature-alignment`

The navbar final version: image