V1.0.0
This commit is contained in:
@@ -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")),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user