diff --git a/lib/widgets/bottomNav_chithra.dart b/lib/widgets/bottomNav_chithra.dart new file mode 100644 index 0000000..de9c9a7 --- /dev/null +++ b/lib/widgets/bottomNav_chithra.dart @@ -0,0 +1,91 @@ +import 'package:flutter/material.dart'; + +class BottomNavChithra extends StatefulWidget { + const BottomNavChithra({Key? key}) : super(key: key); + + @override + State createState() => _BottomNavChithraState(); +} + +class _BottomNavChithraState extends State { + int _currentIndex = 0; + + final List _screens = [ + const HomeScreen(), + const MenuScreen(), + const ProfileScreen(), + ]; + + @override + Widget build(BuildContext context) { + return Scaffold( + body: _screens[_currentIndex], + bottomNavigationBar: BottomNavigationBar( + currentIndex: _currentIndex, + onTap: (index) { + setState(() { + _currentIndex = index; + }); + }, + items: const [ + BottomNavigationBarItem( + icon: Icon(Icons.home), + label: 'Home', + ), + BottomNavigationBarItem( + icon: Icon(Icons.restaurant_menu), + label: 'Menu', + ), + BottomNavigationBarItem( + icon: Icon(Icons.person), + label: 'Profile', + ), + ], + ), + ); + } +} + +/* -------- Placeholder Screens -------- */ + +class HomeScreen extends StatelessWidget { + const HomeScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text( + 'Home Screen', + style: TextStyle(fontSize: 22), + ), + ); + } +} + +class MenuScreen extends StatelessWidget { + const MenuScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text( + 'Menu Screen', + style: TextStyle(fontSize: 22), + ), + ); + } +} + +class ProfileScreen extends StatelessWidget { + const ProfileScreen({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const Center( + child: Text( + 'Profile Screen', + style: TextStyle(fontSize: 22), + ), + ); + } +}