mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
opt: navigation bar (#740)
This commit is contained in:
@@ -144,10 +144,7 @@ class _HomePageState extends State<HomePage>
|
||||
config: {
|
||||
Breakpoints.small: SlotLayout.from(
|
||||
key: const Key('bottomNavigation'),
|
||||
builder: (context) => ListenableBuilder(
|
||||
listenable: _selectIndex,
|
||||
builder: (context, child) => _buildBottomBar(),
|
||||
),
|
||||
builder: (context) => _buildBottomBar(),
|
||||
),
|
||||
},
|
||||
),
|
||||
@@ -156,23 +153,29 @@ class _HomePageState extends State<HomePage>
|
||||
}
|
||||
|
||||
Widget _buildBottomBar() {
|
||||
return ListenableBuilder(
|
||||
return Stores.setting.fullScreen.fetch()
|
||||
? UIs.placeholder
|
||||
: ListenableBuilder(
|
||||
listenable: _selectIndex,
|
||||
builder: (context, child) => NavigationBar(
|
||||
selectedIndex: _selectIndex.value,
|
||||
height: kBottomNavigationBarHeight * 1.1,
|
||||
animationDuration: const Duration(milliseconds: 250),
|
||||
onDestinationSelected: _onDestinationSelected,
|
||||
labelBehavior: NavigationDestinationLabelBehavior.onlyShowSelected,
|
||||
labelBehavior:
|
||||
NavigationDestinationLabelBehavior.onlyShowSelected,
|
||||
destinations: AppTab.navDestinations,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildRailBar({bool extended = false}) {
|
||||
return ListenableBuilder(
|
||||
return Stores.setting.fullScreen.fetch()
|
||||
? UIs.placeholder
|
||||
: ListenableBuilder(
|
||||
listenable: _selectIndex,
|
||||
builder: (context, child) => AdaptiveScaffold.standardNavigationRail(
|
||||
builder: (context, child) =>
|
||||
AdaptiveScaffold.standardNavigationRail(
|
||||
extended: extended,
|
||||
padding: EdgeInsets.zero,
|
||||
selectedIndex: _selectIndex.value,
|
||||
|
||||
Reference in New Issue
Block a user