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 151 forks source link

Item Badges alignment isn't right #146

Closed lucianojung closed 3 years ago

lucianojung commented 3 years ago

Describe the bug

When I create a ConvexAppBar.badge widget and provide a list of badges they are shown at the center/left bottom of the icon instead of the right upper corner

Environment details

Using Flutter 2.3.0-1.0.pre.20 - channel master with Dart version 2.14.0 Using package version 3.0.0

To Reproduce

  1. Create a stateful widget like shown in this code snippet
  2. Run with edge and Flutter web emulator
  3. if necessary activate tabItem Badges
  4. See error

Expected behavior

I expected the badges to be shown in the right upper corner of each icon

Screenshots

image

avenwu commented 3 years ago

looks weird. have you checkout the badge sample?

lucianojung commented 3 years ago

Yes, I used it like this. I'm not changing any alignment only giving BadgesMap using ConvexAppBar.badges

zamberform commented 3 years ago

Same problem. Can I control the badge padding/size like StyleProvider(Style)?

zamberform commented 3 years ago

Oh, it can be.

@lucianojung I think you can use this to adjust somewhere

ConvexAppBar.badge(
    {
     // some data
    }
    badgePadding: // EdgeInsets you know
    badgeMargin: // EdgeInsets you know
);
avenwu commented 3 years ago

Reopen if there's anything we can do