Commit 58bc9a1b authored by Uditha Prabhasha 's avatar Uditha Prabhasha

update v1.3

parent f77aa56a
No preview for this file type
File added
......@@ -5,7 +5,8 @@ import 'package:jema_app/teacherchat.dart';
import 'package:jema_app/classroomview.dart';
import 'package:jema_app/addclassroom.dart';
import 'childrenProfile.dart'; // Import the AddClassroomPage file
import 'childrenProfile.dart';
class ChildrenHomePage extends StatelessWidget {
late User? user;
......
This diff is collapsed.
......@@ -5,6 +5,8 @@ import 'package:jema_app/Attendance.dart';
import 'ChildrenHomePage.dart';
import 'activities.dart';
import 'addstudent.dart';
import 'kidscheck_in_out.dart';
import 'kidsreports.dart';
class ClassroomViewPage extends StatelessWidget {
var documents;
......@@ -52,7 +54,7 @@ class ClassroomViewPage extends StatelessWidget {
// Navigate to AddStudentPage
Navigator.push(
context,
MaterialPageRoute(builder: (context) => AddStudentPage()),
MaterialPageRoute(builder: (context) => AddStudent()),
);
},
child: Text('Add Student'),
......@@ -356,8 +358,15 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
//check in and out
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => KidsCheckssPage()),
);
},
child: Container(
width: 170,
height: 85,
......@@ -441,6 +450,9 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
//calendar
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
......@@ -506,7 +518,15 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
Padding(
//report
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => KidsReportsPage()),
);
},
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
......@@ -527,7 +547,7 @@ class ClassroomViewPage extends StatelessWidget {
blurRadius: 2,
offset: Offset(0, 1),
spreadRadius: 0,
)
),
],
),
child: Stack(
......@@ -535,7 +555,6 @@ class ClassroomViewPage extends StatelessWidget {
Positioned(
left: 8,
top: 35,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
......@@ -556,7 +575,6 @@ class ClassroomViewPage extends StatelessWidget {
],
),
),
),
Positioned(
right: 8,
bottom: 8,
......@@ -571,6 +589,8 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
),
]),
],
),
......
import 'package:flutter/material.dart';
class KidsCheckssPage extends StatelessWidget {
final List<KidData> kidsData = [
KidData(name: 'Adam', imageUrl: "lib/assets/Ellipse 8.png"),
KidData(name: 'Jude', imageUrl: "lib/assets/Ellipse 8.png"),
KidData(name: 'Anne', imageUrl: 'url_to_kid3_image'),
// Add more kids data as needed
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Check In / Out'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bright Sparkle ',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
Text(
'Select Kid',
style: TextStyle(
fontSize: 18,
),
),
SizedBox(height: 16),
ListView.builder(
shrinkWrap: true,
itemCount: (kidsData.length / 4).ceil(),
itemBuilder: (context, rowIndex) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(4, (indexInRow) {
final kidIndex = rowIndex * 4 + indexInRow;
if (kidIndex < kidsData.length) {
return KidProfile(
name: kidsData[kidIndex].name,
imageUrl: kidsData[kidIndex].imageUrl,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ReportViewPage(
kidName: kidsData[kidIndex].name,
),
),
);
},
);
} else {
return SizedBox(width: 60, height: 60);
}
}),
);
},
),
],
),
),
);
}
}
class KidData {
final String name;
final String imageUrl;
KidData({required this.name, required this.imageUrl});
}
class KidProfile extends StatelessWidget {
final String name;
final String imageUrl;
final VoidCallback onTap;
const KidProfile({
Key? key,
required this.name,
required this.imageUrl,
required this.onTap,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Column(
children: [
CircleAvatar(
radius: 30,
backgroundImage: NetworkImage(imageUrl),
),
SizedBox(height: 8),
Text(name),
],
),
);
}
}
class ReportViewPage extends StatelessWidget {
final String kidName;
ReportViewPage({required this.kidName});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Report for $kidName'),
),
body: Center(
child: Text('report content here for $kidName'),
),
);
}
}
import 'package:flutter/material.dart';
class KidsReportsPage extends StatelessWidget {
final List<KidData> kidsData = [
KidData(name: 'Adam', imageUrl: "lib/assets/Ellipse 8.png"),
KidData(name: 'Jude', imageUrl: "lib/assets/Ellipse 8.png"),
KidData(name: 'Anne', imageUrl: 'url_to_kid3_image'),
KidData(name: 'Adam', imageUrl: 'url_to_kid3_image'),
KidData(name: 'Jeny', imageUrl: 'url_to_kid3_image'),
KidData(name: 'Joshi', imageUrl: 'url_to_kid3_image'),
// Add more kids data as needed
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Reports'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bright Sparkle ',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
),
),
Text(
'Select Kid',
style: TextStyle(
fontSize: 18,
),
),
SizedBox(height: 16),
ListView.builder(
shrinkWrap: true,
itemCount: (kidsData.length / 4).ceil(),
itemBuilder: (context, rowIndex) {
return Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: List.generate(4, (indexInRow) {
final kidIndex = rowIndex * 4 + indexInRow;
if (kidIndex < kidsData.length) {
return KidProfile(
name: kidsData[kidIndex].name,
imageUrl: kidsData[kidIndex].imageUrl,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ReportViewPage(
kidName: kidsData[kidIndex].name,
),
),
);
},
);
} else {
return SizedBox(width: 60, height: 60);
}
}),
);
},
),
],
),
),
);
}
}
class KidData {
final String name;
final String imageUrl;
KidData({required this.name, required this.imageUrl});
}
class KidProfile extends StatelessWidget {
final String name;
final String imageUrl;
final VoidCallback onTap;
const KidProfile({
Key? key,
required this.name,
required this.imageUrl,
required this.onTap,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Column(
children: [
CircleAvatar(
radius: 30,
backgroundImage: NetworkImage(imageUrl),
),
SizedBox(height: 8),
Text(name),
],
),
);
}
}
class ReportViewPage extends StatelessWidget {
final String kidName;
ReportViewPage({required this.kidName});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Report for $kidName'),
),
body: Center(
child: Text('report content here for $kidName'),
),
);
}
}
......@@ -3,7 +3,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:jema_app/teacherchat.dart';
import 'package:jema_app/classroomview.dart';
import 'package:jema_app/addclassroom.dart'; // Import the AddClassroomPage file
import 'package:jema_app/addclassroom.dart';
class TeacherHomePage extends StatelessWidget {
late User? user;
......
......@@ -35,11 +35,13 @@ dependencies:
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
image_picker: ^0.8.0
firebase_core: ^2.24.2
firebase_auth: ^4.15.3
cloud_firestore: ^4.13.6
awesome_dialog: ^3.1.0
dev_dependencies:
flutter_test:
sdk: flutter
......@@ -76,6 +78,10 @@ flutter:
- lib/assets/Vector 2.png
- lib/assets/Vector22.png
- lib/assets/Vector23.png
- lib/assets/Vector24.png
- lib/assets/Vector25.png
- lib/assets/Vector26.png
- lib/assets/Ellipse 8.png
......
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