Commit 00d0c33c authored by Uditha Prabhasha 's avatar Uditha Prabhasha

update bottom nav with gaes part

parent 2a72d05b
No preview for this file type
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart'; import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:mobile_application_kids/games.dart';
import 'package:mobile_application_kids/login.dart'; import 'package:mobile_application_kids/login.dart';
import 'package:mobile_application_kids/teacherchat.dart'; import 'package:mobile_application_kids/teacherchat.dart';
import 'package:mobile_application_kids/teacherhome.dart'; import 'package:mobile_application_kids/teacherhome.dart';
...@@ -477,7 +478,6 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> { ...@@ -477,7 +478,6 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
], ],
), ),
), ),
bottomNavigationBar: BottomNavigationBar(
bottomNavigationBar: BottomNavigationBar( bottomNavigationBar: BottomNavigationBar(
items: const [ items: const [
BottomNavigationBarItem( BottomNavigationBarItem(
...@@ -501,7 +501,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> { ...@@ -501,7 +501,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
unselectedItemColor: Color(0xFFA9ABAD), unselectedItemColor: Color(0xFFA9ABAD),
selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)), selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)),
unselectedLabelStyle: TextStyle(color: Color.fromARGB(0, 197, 16, 16)), unselectedLabelStyle: TextStyle(color: Color.fromARGB(0, 197, 16, 16)),
currentIndex: 0, currentIndex: 3,
onTap: (index) { onTap: (index) {
switch (index) { switch (index) {
case 0: case 0:
...@@ -536,7 +536,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> { ...@@ -536,7 +536,7 @@ class _TeacherProfilePageState extends State<TeacherProfilePage> {
), ),
); );
break; break;
}
}, },
), ),
), ),
......
...@@ -35,8 +35,10 @@ class GamesPage extends StatelessWidget { ...@@ -35,8 +35,10 @@ class GamesPage extends StatelessWidget {
label: 'Profile', label: 'Profile',
), ),
], ],
selectedItemColor: Colors.blue, selectedItemColor: Color(0xFF7A1FA0),
unselectedItemColor: Colors.grey, unselectedItemColor: Color(0xFFA9ABAD),
selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)),
unselectedLabelStyle: TextStyle(color: Color.fromARGB(0, 197, 16, 16)),
currentIndex: 2, currentIndex: 2,
onTap: (index) { onTap: (index) {
switch (index) { switch (index) {
......
...@@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; ...@@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:mobile_application_kids/addclassroom.dart'; import 'package:mobile_application_kids/addclassroom.dart';
import 'package:mobile_application_kids/childrenProfile.dart'; import 'package:mobile_application_kids/childrenProfile.dart';
import 'package:mobile_application_kids/classroomview.dart'; import 'package:mobile_application_kids/classroomview.dart';
import 'package:mobile_application_kids/games.dart';
import 'package:mobile_application_kids/teacherchat.dart'; import 'package:mobile_application_kids/teacherchat.dart';
import 'ChatScreen.dart'; import 'ChatScreen.dart';
...@@ -190,7 +191,7 @@ class ParentHomePage extends StatelessWidget { ...@@ -190,7 +191,7 @@ class ParentHomePage extends StatelessWidget {
label: 'Chat', label: 'Chat',
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
icon: Icon(Icons.games), icon: Icon(Icons.videogame_asset),
label: 'Games', label: 'Games',
), ),
BottomNavigationBarItem( BottomNavigationBarItem(
...@@ -201,7 +202,8 @@ class ParentHomePage extends StatelessWidget { ...@@ -201,7 +202,8 @@ class ParentHomePage extends StatelessWidget {
selectedItemColor: Color(0xFF7A1FA0), selectedItemColor: Color(0xFF7A1FA0),
unselectedItemColor: Color(0xFFA9ABAD), unselectedItemColor: Color(0xFFA9ABAD),
selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)), selectedLabelStyle: TextStyle(color: Color(0xFF7A1FA0)),
unselectedLabelStyle: TextStyle(color: Color(0xFFA9ABAD)), unselectedLabelStyle: TextStyle(color: Color.fromARGB(0, 197, 16, 16)),
currentIndex: 0,
onTap: (index) { onTap: (index) {
switch (index) { switch (index) {
case 0: case 0:
...@@ -214,6 +216,13 @@ class ParentHomePage extends StatelessWidget { ...@@ -214,6 +216,13 @@ class ParentHomePage extends StatelessWidget {
break; break;
case 2: case 2:
// Handle Game // Handle Game
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GamesPage(
),
),
);
break; break;
case 3: case 3:
Navigator.push( Navigator.push(
......
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