Skip to content

Commit

Permalink
remove testing menubutton
Browse files Browse the repository at this point in the history
  • Loading branch information
sevenrats committed Jul 3, 2024
1 parent 293cab3 commit 650e45d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
34 changes: 0 additions & 34 deletions lib/components/jfx_nav_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class JfxNavBarLeft extends StatelessWidget {

@override
Widget build(BuildContext context) {
var storedIndex = 1;
return Container(
decoration: BoxDecoration(
// add elevation
Expand Down Expand Up @@ -160,39 +159,6 @@ class JfxNavBarLeft extends StatelessWidget {
context.go(ScreenPaths.library);
},
),
JfxNavBarPopupMenuButton(
icon: Icons.video_library_outlined,
label: 'More',
selected: selectedIndex.value == 9,
onOpened: () async {
storedIndex = selectedIndex.value;
selectedIndex.value = 9;
},
onCanceled: () async {
selectedIndex.value = storedIndex;
},
onSelected: () async {
bool online = await showOfflineSnackbar(
context, ref.read(authStateProvider.notifier).state);
if (online) {
selectedIndex.value = 9;
}
},
items: const [
PopupMenuItem<String>(
value: 'hello',
child: Text('Hello'),
),
PopupMenuItem<String>(
value: 'about',
child: Text('About'),
),
PopupMenuItem<String>(
value: 'contact',
child: Text('Contact'),
),
],
),
const Expanded(
child: SizedBox(),
),
Expand Down
4 changes: 4 additions & 0 deletions lib/components/jfx_nav_bar_buttons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,13 @@ class JfxNavBarPopupMenuButtonLargeState
});
},
onOpened: () {
widget.onOpened();
setState(() {
menuOpen = true;
});
},
onCanceled: () {
widget.onCanceled();
setState(() {
menuOpen = false;
});
Expand Down Expand Up @@ -329,11 +331,13 @@ class JfxNavBarPopupMenuButtonSmallState
});
},
onOpened: () {
widget.onOpened();
setState(() {
menuOpen = true;
});
},
onCanceled: () {
widget.onSelected();
setState(() {
menuOpen = false;
});
Expand Down

0 comments on commit 650e45d

Please sign in to comment.