This commit is contained in:
2025-10-16 17:42:46 +02:00
parent dc86955721
commit 2e3a69a23e
12 changed files with 1421 additions and 604 deletions
+13 -6
View File
@@ -1,15 +1,22 @@
import 'package:flutter/material.dart';
import '../utils/translations.dart';
class BottomNavBar extends StatelessWidget {
final int selectedIndex;
final Function(int) onItemTapped;
final String selectedLanguage;
const BottomNavBar({
super.key,
required this.selectedIndex,
required this.onItemTapped,
required this.selectedLanguage,
});
String _t(String key) {
return AppTranslations.translate(key, selectedLanguage);
}
@override
Widget build(BuildContext context) {
return SafeArea(
@@ -26,12 +33,12 @@ Widget build(BuildContext context) {
unselectedFontSize: 12,
selectedItemColor: Colors.white,
unselectedItemColor: Colors.white70,
items: const [
BottomNavigationBarItem(icon: Icon(Icons.book), label: "Book"),
BottomNavigationBarItem(icon: Icon(Icons.my_location), label: "Shooting"),
BottomNavigationBarItem(icon: Icon(Icons.camera_alt), label: "Camera"),
BottomNavigationBarItem(icon: Icon(Icons.calendar_today), label: "Calendar"),
BottomNavigationBarItem(icon: Icon(Icons.settings), label: "Settings"),
items: [
BottomNavigationBarItem(icon: const Icon(Icons.book), label: _t("Book")),
BottomNavigationBarItem(icon: const Icon(Icons.my_location), label: _t("Shooting")),
BottomNavigationBarItem(icon: const Icon(Icons.camera_alt), label: _t("Camera")),
BottomNavigationBarItem(icon: const Icon(Icons.calendar_today), label: _t("Calendar")),
BottomNavigationBarItem(icon: const Icon(Icons.settings), label: _t("Settings")),
],
),
),