Commit 2a72d05b authored by Uditha Prabhasha 's avatar Uditha Prabhasha

Update TeacherProfile.dart

parent 7ee6ebcb
......@@ -478,6 +478,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
),
),
bottomNavigationBar: BottomNavigationBar(
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
......@@ -487,33 +488,55 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
icon: Icon(Icons.chat),
label: 'Chat',
),
BottomNavigationBarItem(
icon: Icon(Icons.videogame_asset),
label: 'Games',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
selectedItemColor: Colors.blue,
selectedItemColor: Color(0xFF7A1FA0),
unselectedItemColor: Color(0xFFA9ABAD),
selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)),
unselectedLabelStyle: TextStyle(color: Color.fromARGB(0, 197, 16, 16)),
currentIndex: 0,
onTap: (index) {
// Handle bottom navigation item tap
if (index == 0) {
Navigator.push(
switch (index) {
case 0:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => TeacherHomePage()),
);
}
if (index == 1) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ChatScreen()),
);
}
if (index == 2) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TeacherProfilePage(uid: user?.uid)),
);
}
break;
case 1:
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ChatScreen()),
);
break;
case 2:
// Handle Game
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GamesPage(
),
),
);
break;
case 3:
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TeacherProfilePage(
uid: user?.uid,
),
),
);
break;
},
),
),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment