MVP #141

Merged
flixcoo merged 705 commits from development into main 2026-01-09 12:55:50 +00:00
Showing only changes of commit 17d304eb5d - Show all commits

View File

@@ -80,31 +80,37 @@ class _CustomNavigationBarState extends State<CustomNavigationBar>
}
Widget _buildNavItem(IconData icon, String label, int index) {
final isSelected = currentIndex == index;
final isSelected = currentIndex == index;
return GestureDetector(
return Expanded( // makes each nav item occupy equal width = large horizontal hitbox
child: GestureDetector(
onTap: () => onTabTapped(index),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
icon,
color: isSelected ? Colors.white : Colors.black,
),
const SizedBox(height: 4),
Text(
label,
style: TextStyle(
behavior: HitTestBehavior.opaque, // ensures the entire area is tappable
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 5.0), // adds comfortable tap height
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
icon,
color: isSelected ? Colors.white : Colors.black,
fontSize: 12,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
),
),
],
const SizedBox(height: 4),
Text(
label,
style: TextStyle(
color: isSelected ? Colors.white : Colors.black,
fontSize: 12,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
),
),
],
),
),
);
}
),
);
}
void onTabTapped(int index) {
setState(() {