import 'package:flutter/material.dart'; import 'menu.dart'; class AppNavbar extends StatefulWidget { final int currentPageIndex; final Function(int) onTapNavbarItem; const AppNavbar({ super.key, required this.currentPageIndex, required this.onTapNavbarItem, }); @override State createState() => AppNavbarState(); } class AppNavbarState extends State { @override Widget build(BuildContext context) { final colors = Theme.of(context).colorScheme; return BottomNavigationBar( currentIndex: widget.currentPageIndex, onTap: widget.onTapNavbarItem, items: bottomNavItems, type: BottomNavigationBarType.fixed, selectedItemColor: colors.primary, unselectedItemColor: colors.onSurface.withAlpha(150), showSelectedLabels: true, showUnselectedLabels: true, backgroundColor: colors.surface, elevation: 8, ); } }