forked from eatvio/eatvio_app
fix style warning
This commit is contained in:
@@ -19,51 +19,53 @@ class BottomNavigationBarWidget extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
|
||||
void _onItemTapped(int index) {
|
||||
if (currentBottomNavBarIndex != index) {
|
||||
setState(() {
|
||||
currentBottomNavBarIndex = index;
|
||||
});
|
||||
}
|
||||
switch (currentBottomNavBarIndex) {
|
||||
case 0:
|
||||
GoRouter.of(context).replace('/my-profile-screen');
|
||||
break;
|
||||
case 1:
|
||||
GoRouter.of(context).replace('/feed-screen');
|
||||
break;
|
||||
case 2:
|
||||
GoRouter.of(context).replace('/diary-screen');
|
||||
break;
|
||||
case 3:
|
||||
GoRouter.of(context).replace('/chat-select-screen');
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
case 5:
|
||||
final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
|
||||
final size = overlay.size;
|
||||
showMenu(
|
||||
context: context,
|
||||
color: Colors.white,
|
||||
shadowColor: Colors.white,
|
||||
surfaceTintColor: Colors.white,
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
child: CustomNavigationMenu(),
|
||||
)
|
||||
],
|
||||
position: RelativeRect.fromLTRB(size.width, size.height, 0, 0),
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: widget.child,
|
||||
bottomNavigationBar: BottomNavigationBar(
|
||||
type: BottomNavigationBarType.fixed,
|
||||
onTap: (index) {
|
||||
if (currentBottomNavBarIndex != index) {
|
||||
setState(() {
|
||||
currentBottomNavBarIndex = index;
|
||||
});
|
||||
}
|
||||
switch (currentBottomNavBarIndex) {
|
||||
case 0:
|
||||
GoRouter.of(context).replace('/my-profile-screen');
|
||||
break;
|
||||
case 1:
|
||||
GoRouter.of(context).replace('/feed-screen');
|
||||
break;
|
||||
case 2:
|
||||
GoRouter.of(context).replace('/diary-screen');
|
||||
break;
|
||||
case 3:
|
||||
GoRouter.of(context).replace('/chat-select-screen');
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
case 5:
|
||||
final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
|
||||
final size = overlay.size;
|
||||
showMenu(
|
||||
context: context,
|
||||
color: Colors.white,
|
||||
shadowColor: Colors.white,
|
||||
surfaceTintColor: Colors.white,
|
||||
items: [
|
||||
PopupMenuItem(
|
||||
child: CustomNavigationMenu(),
|
||||
)
|
||||
],
|
||||
position: RelativeRect.fromLTRB(size.width, size.height, 0, 0),
|
||||
);
|
||||
break;
|
||||
}
|
||||
},
|
||||
onTap: _onItemTapped,
|
||||
selectedFontSize: 12,
|
||||
unselectedFontSize: 12,
|
||||
selectedItemColor: appTheme.blueA400,
|
||||
|
||||
Reference in New Issue
Block a user