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

dynamic GapPosition have an unexpected effect #46

Closed
zmm2tysu opened this issue Oct 14, 2022 · 2 comments · Fixed by #53
Closed

dynamic GapPosition have an unexpected effect #46

zmm2tysu opened this issue Oct 14, 2022 · 2 comments · Fixed by #53

Comments

@zmm2tysu
Copy link

When I toggle tab bar, I need the FAB show and hide dynamically, meanwhile I set gapPosition dynamically.
But it has splash effect, that's weird, so I wonder if it has some solution for this effect.

Here is the video for effect.

RPReplay_Final1665732798.mov

Part of code:

AnimatedBottomNavigationBar.builder(
  itemCount: icons.length,
  notchSmoothness: NotchSmoothness.softEdge,
  tabBuilder: (int index, bool isActive) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Image.asset(icons.elementAt(index)[isActive ? 1 : 0], width: isActive ? 34.w : 22.w, height: isActive ? 34.w : 22.w),
      ],
    );
  },
  backgroundColor: Colors.white,
  activeIndex: _bottomNavIndex,
  splashColor: Colors.black,
  splashSpeedInMilliseconds: 200,
  notchAndCornersAnimation: borderRadiusAnimation,
  gapLocation: _bottomNavIndex == 2 ? GapLocation.center : GapLocation.none,
  leftCornerRadius: 24,
  rightCornerRadius: 24,
)
@vizhan-lanars
Copy link
Collaborator

Thanks for your report.
I'll take a look into it soon

@chris-herring
Copy link

chris-herring commented Feb 27, 2023

Hitting the same issue. Found any solutions?

I'm working around this atm by duplicating the package and commenting out the gapLocation errors in circular_notched_and_cornered_shape.dart.
I assume the problem is this builder method is not quite in sync with the changes to the FloatingActionButton so this error is thrown until it all catches up.

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

Successfully merging a pull request may close this issue.

3 participants