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

[scroll_bottom_navigation_bar] BottomNavigationItems overflowed by 2.0 pixels on the bottom. #25

Open
greyovo opened this issue May 31, 2022 · 1 comment

Comments

@greyovo
Copy link

greyovo commented May 31, 2022

image

I have tried adjusting BottomNavigationBar's iconSize, (selected / unselected) fontSize, or wrapping the whole Scaffold with SafeArea(), but none of them works. Any workaround here?

My code:

  Widget _buildAppContainer() {
    return Scaffold(
      appBar: AppBar(toolbarHeight: 0, elevation: 0),
      body: ValueListenableBuilder<int>(
        valueListenable: appScrollController.bottomNavigationBar.tabNotifier,
        builder: (context, tabIndex, child) => _pageOptions[tabIndex],
      ),
      bottomNavigationBar: ScrollBottomNavigationBar(
        controller: appScrollController,
        showUnselectedLabels: false,
        items: const [
          BottomNavigationBarItem(icon: Icon(Icons.home), label: 'Home'),
          BottomNavigationBarItem(icon: Icon(Icons.cloud_circle), label: 'Cloud'),
          BottomNavigationBarItem(icon: Icon(Icons.groups), label: 'Team'),
          BottomNavigationBarItem(icon: Icon(Icons.face), label: 'Me'),
        ],
        currentIndex: _selectedIndex,
        onTap: (index) => onTapNavItem(index),
        type: BottomNavigationBarType.shifting,
      ),
    );
  }
@greyovo greyovo changed the title [scroll_bottom_navigation_bar] BottomNavigationItems overflows by 2 pixels [scroll_bottom_navigation_bar] BottomNavigationItems overflowed by 2.0 pixels on the bottom. May 31, 2022
@greyovo
Copy link
Author

greyovo commented May 31, 2022

I temporarily set Icon's size in BottomNavigationBarItem to '22.0' and fixed it:

BottomNavigationBarItem(icon: Icon(Icons.home, size: 22), label: 'Home')

But it is still a bug since setting BottomNavigationBar's iconSize or (selected / unselected) fontSize has NO effect on either icon size or text size.

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