auto_route_library
auto_route_library copied to clipboard
Dynamic bottomNavigationBuilder
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
didChangeDependencies() { hideBar = MyScreenSize.isDesktop(context);}
bottomNavigationBuilder: hideBar ? null : (_, tabsRouter) {
return EzoAppBottomBar(
tabsRouter: tabsRouter,
);
},
or instead of Container in your example use SizedBox.shrink()
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