Commit 8d4d835b authored by Uditha Prabhasha 's avatar Uditha Prabhasha

Update games.dart

parent e2407b4c
import 'package:flutter/material.dart';
import 'package:mobile_application_kids/addclassroom.dart';
import 'package:mobile_application_kids/chatScreen.dart';
import 'package:mobile_application_kids/teacherProfile.dart';
class GamesPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Games'),
),
body: Center(
child: Text(
'Welcome to the Games Page!',
style: TextStyle(fontSize: 20),
),
),
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.chat),
label: 'Chat',
),
BottomNavigationBarItem(
icon: Icon(Icons.games),
label: 'Games',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
selectedItemColor: Colors.blue,
unselectedItemColor: Colors.grey,
onTap: (index) {
switch (index) {
case 0:
// Navigate to Home
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AddClassroomPage()),
);
break;
case 1:
// Navigate to Chat
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ChatScreen()),
);
break;
case 2:
// Already on Games Page
break;
case 3:
// Navigate to Profile
Navigator.push(
context,
MaterialPageRoute(builder: (context) => TeacherProfilePage()),
);
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