custom_bottom_navigation_bar.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // ignore_for_file: prefer_const_constructors
  2. import 'package:flutter/material.dart';
  3. import 'package:sis_flutter/themes/themes.dart';
  4. class CustomBottomNavigationBar extends StatelessWidget {
  5. final int indexValue;
  6. final ValueChanged<int> onIndexSelected;
  7. const CustomBottomNavigationBar(
  8. {super.key, required this.indexValue, required this.onIndexSelected});
  9. @override
  10. Widget build(BuildContext context) {
  11. return BottomNavigationBar(
  12. currentIndex: indexValue,
  13. backgroundColor: Colors.white,
  14. selectedItemColor: AppTheme.primary,
  15. unselectedItemColor: Colors.black87,
  16. onTap: onIndexSelected,
  17. items: const [
  18. BottomNavigationBarItem(
  19. icon: Icon(
  20. Icons.home,
  21. color: Colors.black87,
  22. ),
  23. label: 'Inicio',
  24. ),
  25. BottomNavigationBarItem(
  26. icon: Icon(
  27. Icons.person,
  28. color: Colors.black87,
  29. ),
  30. label: "Perfil",
  31. ),
  32. BottomNavigationBarItem(
  33. icon: Icon(
  34. Icons.calendar_today,
  35. color: Colors.black87,
  36. ),
  37. label: 'Calendario',
  38. ),
  39. ],
  40. );
  41. }
  42. }