first commit
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BottomNavBar extends StatelessWidget {
|
||||
final int selectedIndex;
|
||||
final Function(int) onItemTapped;
|
||||
|
||||
const BottomNavBar({
|
||||
super.key,
|
||||
required this.selectedIndex,
|
||||
required this.onItemTapped,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SafeArea(
|
||||
child: SizedBox(
|
||||
height: 80,
|
||||
child: BottomNavigationBar(
|
||||
backgroundColor: Colors.grey[900],
|
||||
currentIndex: selectedIndex,
|
||||
onTap: onItemTapped,
|
||||
showSelectedLabels: true,
|
||||
showUnselectedLabels: true,
|
||||
type: BottomNavigationBarType.fixed,
|
||||
selectedFontSize: 12,
|
||||
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"),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InputField extends StatelessWidget {
|
||||
final String hintText;
|
||||
final IconData icon;
|
||||
final bool obscureText;
|
||||
final TextEditingController controller;
|
||||
|
||||
const InputField({
|
||||
super.key,
|
||||
required this.hintText,
|
||||
required this.icon,
|
||||
this.obscureText = false,
|
||||
required this.controller,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return TextField(
|
||||
controller: controller,
|
||||
obscureText: obscureText,
|
||||
style: const TextStyle(color: Colors.grey), // Text inside input field is gray
|
||||
decoration: InputDecoration(
|
||||
prefixIcon: Icon(icon, color: Colors.grey), // Icons inside input field are gray
|
||||
hintText: hintText,
|
||||
hintStyle: const TextStyle(color: Colors.grey), // Placeholder text is gray
|
||||
filled: true,
|
||||
fillColor: Colors.grey[300], // Light gray background for inputs
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: BorderSide.none, // No border
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user