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

Style hook not work with the react and reactCircle style. #173

Open
SittiphanSittisak opened this issue Jun 16, 2022 · 0 comments
Open

Style hook not work with the react and reactCircle style. #173

SittiphanSittisak opened this issue Jun 16, 2022 · 0 comments

Comments

@SittiphanSittisak
Copy link

SittiphanSittisak commented Jun 16, 2022

I test on flutter web.
The iconSize and activeIconMargin don't work with the react and reactCircle style.
When I use your StyleHook with the react and reactCircle style, the console will show A RenderFlex overflowed by 2.0 pixels on the bottom.

flutter web:
image

your style hook from pub.dev:
image

minimal code:

bottomNavigationBar: StyleProvider(
          style: ConvexAppBarStyle(),
          child: ConvexAppBar(
            style: TabStyle.react,
            items: tabItem,
          ),
        ),

You can try this style to see the bug:

class ConvexAppBarStyle extends StyleHook {
  @override
  double get activeIconSize => 20;

  @override
  double get activeIconMargin => 1;

  @override
  double get iconSize => 1;

  @override
  TextStyle textStyle(Color color) {
    return TextStyle(fontSize: 20, color: color);
  }
}

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.2, on Microsoft Windows [Version 10.0.19044.1706], locale th-TH)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.5)
[√] Android Studio (version 2021.2)
[√] VS Code (version 1.68.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

• No issues found!

I think it's a bug. It only happens when using the react and reactCircle style.

  • activeIconMargin
  • iconSize
  • height overflow
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

1 participant