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

Update TeacherProfile.dart

parent 7ee6ebcb
...@@ -477,6 +477,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> { ...@@ -477,6 +477,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
], ],
), ),
), ),
bottomNavigationBar: BottomNavigationBar(
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(
items: const [ items: const [
BottomNavigationBarItem( BottomNavigationBarItem(
...@@ -487,33 +488,55 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> { ...@@ -487,33 +488,55 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
icon: Icon(Icons.chat), icon: Icon(Icons.chat),
label: 'Chat', label: 'Chat',
), ),
BottomNavigationBarItem(
icon: Icon(Icons.videogame_asset),
label: 'Games',
),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.person), icon: Icon(Icons.person),
label: 'Profile', 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) { onTap: (index) {
// Handle bottom navigation item tap switch (index) {
if (index == 0) { case 0:
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => TeacherHomePage()), MaterialPageRoute(builder: (context) => TeacherHomePage()),
); );
} break;
if (index == 1) { case 1:
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => ChatScreen()), MaterialPageRoute(builder: (context) => ChatScreen()),
); );
} break;
if (index == 2) { case 2:
// Handle Game
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (context) => TeacherProfilePage(uid: user?.uid)), 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