auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Dynamic bottomNavigationBuilder

Open markbulingit opened this issue 2 years ago • 2 comments

I want to show a bottomBar on Mobile & Tablet but hide it on Desktop.

     bottomNavigationBuilder: (_, tabsRouter) {
        return !MyScreenSize.isDesktop(context) ? EzoAppBottomBar(
          tabsRouter: tabsRouter,
        ) :Container();
      },

The problem is the Scaffold goes completely blank

markbulingit avatar Oct 21 '21 15:10 markbulingit

didChangeDependencies() { hideBar = MyScreenSize.isDesktop(context);}

bottomNavigationBuilder: hideBar ? null : (_, tabsRouter) {
        return EzoAppBottomBar(
          tabsRouter: tabsRouter,
        );
      },

or instead of Container in your example use SizedBox.shrink()

yevyevyev avatar Oct 22 '21 11:10 yevyevyev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions

github-actions[bot] avatar Aug 14 '22 08:08 github-actions[bot]