Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Monitoring and Recommendations For Early Childhood Development
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sandunika Senavirathna
Monitoring and Recommendations For Early Childhood Development
Commits
33db20c3
Commit
33db20c3
authored
Feb 25, 2024
by
Uditha Prabhasha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update games.dart
parent
00d0c33c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
15 deletions
+64
-15
lib/games.dart
lib/games.dart
+64
-15
No files found.
lib/games.dart
View file @
33db20c3
import
'package:flutter/material.dart'
;
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
{
class
GamesPage
extends
StatelessWidget
{
final
List
<
Map
<
String
,
String
>>
gameData
=
[
{
'game'
:
'Game 1'
,
'description'
:
'Description for Game 1'
},
{
'game'
:
'Game 2'
,
'description'
:
'Description for Game 2'
},
// add list
];
final
String
commonImagePath
=
'assets/act_photo.png'
;
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
title:
Text
(
'Games'
),
title:
Text
(
'Games'
),
),
),
body:
Center
(
body:
Column
(
child:
Text
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
'Welcome to the Games Page!'
,
children:
[
style:
TextStyle
(
fontSize:
20
),
Padding
(
),
padding:
const
EdgeInsets
.
all
(
16.0
),
child:
Text
(
'My Games'
,
style:
TextStyle
(
fontSize:
24
,
fontWeight:
FontWeight
.
bold
,
),
),
),
Expanded
(
child:
ListView
.
builder
(
itemCount:
gameData
.
length
,
itemBuilder:
(
context
,
index
)
{
var
game
=
gameData
[
index
];
return
Card
(
child:
ListTile
(
contentPadding:
EdgeInsets
.
all
(
16
),
leading:
Container
(
width:
50
,
height:
50
,
child:
CircleAvatar
(
backgroundImage:
AssetImage
(
commonImagePath
),
),
),
title:
Text
(
game
[
'game'
]
??
''
,
style:
TextStyle
(
fontSize:
18
,
fontWeight:
FontWeight
.
bold
,
),
),
subtitle:
Text
(
game
[
'description'
]
??
''
),
),
);
},
),
),
],
),
),
bottomNavigationBar:
BottomNavigationBar
(
bottomNavigationBar:
BottomNavigationBar
(
items:
const
[
items:
const
[
...
@@ -39,26 +81,33 @@ class GamesPage extends StatelessWidget {
...
@@ -39,26 +81,33 @@ class GamesPage extends StatelessWidget {
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:
2
,
currentIndex:
2
,
onTap:
(
index
)
{
onTap:
(
index
)
{
switch
(
index
)
{
switch
(
index
)
{
case
0
:
case
0
:
// Navigate to Home
// Navigate to Home
// Replace the code below with your home navigation logic
// Navigator.push(
// // context,
// // MaterialPageRoute(builder: (context) => AddClassroom()),
// );
break
;
break
;
case
1
:
case
1
:
// Navigate to Chat
// Navigate to Chat
Navigator
.
push
(
//
Navigator.push(
context
,
// //
context,
MaterialPageRoute
(
builder:
(
context
)
=>
ChatScreen
()),
// //
MaterialPageRoute(builder: (context) => ChatScreen()),
);
//
);
break
;
break
;
case
2
:
case
2
:
// Already on Games Page
// Already on Games Page
break
;
break
;
case
3
:
case
3
:
// Navigate to Profile
// Navigate to Profile
// Navigator.push(
// // context,
// // MaterialPageRoute(builder: (context) => TeacherProfile()),
// );
break
;
break
;
}
}
},
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment