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'; ...@@ -5,7 +5,8 @@ import 'package:jema_app/teacherchat.dart';
import 'package:jema_app/classroomview.dart'; import 'package:jema_app/classroomview.dart';
import 'package:jema_app/addclassroom.dart'; import 'package:jema_app/addclassroom.dart';
import 'childrenProfile.dart'; // Import the AddClassroomPage file
import 'childrenProfile.dart';
class ChildrenHomePage extends StatelessWidget { class ChildrenHomePage extends StatelessWidget {
late User? user; late User? user;
......
This diff is collapsed.
...@@ -5,6 +5,8 @@ import 'package:jema_app/Attendance.dart'; ...@@ -5,6 +5,8 @@ import 'package:jema_app/Attendance.dart';
import 'ChildrenHomePage.dart'; import 'ChildrenHomePage.dart';
import 'activities.dart'; import 'activities.dart';
import 'addstudent.dart'; import 'addstudent.dart';
import 'kidscheck_in_out.dart';
import 'kidsreports.dart';
class ClassroomViewPage extends StatelessWidget { class ClassroomViewPage extends StatelessWidget {
var documents; var documents;
...@@ -52,7 +54,7 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -52,7 +54,7 @@ class ClassroomViewPage extends StatelessWidget {
// Navigate to AddStudentPage // Navigate to AddStudentPage
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) => AddStudentPage()), MaterialPageRoute(builder: (context) => AddStudent()),
); );
}, },
child: Text('Add Student'), child: Text('Add Student'),
...@@ -356,8 +358,15 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -356,8 +358,15 @@ class ClassroomViewPage extends StatelessWidget {
), ),
), ),
), ),
Padding( //check in and out
padding: const EdgeInsets.all(10.0),
GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => KidsCheckssPage()),
);
},
child: Container( child: Container(
width: 170, width: 170,
height: 85, height: 85,
...@@ -441,6 +450,9 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -441,6 +450,9 @@ class ClassroomViewPage extends StatelessWidget {
), ),
), ),
), ),
//calendar
Padding( Padding(
padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Container( child: Container(
...@@ -506,7 +518,15 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -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), padding: const EdgeInsets.all(10.0),
child: Container( child: Container(
width: 170, width: 170,
...@@ -527,7 +547,7 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -527,7 +547,7 @@ class ClassroomViewPage extends StatelessWidget {
blurRadius: 2, blurRadius: 2,
offset: Offset(0, 1), offset: Offset(0, 1),
spreadRadius: 0, spreadRadius: 0,
) ),
], ],
), ),
child: Stack( child: Stack(
...@@ -535,7 +555,6 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -535,7 +555,6 @@ class ClassroomViewPage extends StatelessWidget {
Positioned( Positioned(
left: 8, left: 8,
top: 35, top: 35,
child: Container(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
...@@ -556,7 +575,6 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -556,7 +575,6 @@ class ClassroomViewPage extends StatelessWidget {
], ],
), ),
), ),
),
Positioned( Positioned(
right: 8, right: 8,
bottom: 8, bottom: 8,
...@@ -571,6 +589,8 @@ class ClassroomViewPage extends StatelessWidget { ...@@ -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'; ...@@ -3,7 +3,7 @@ import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:jema_app/teacherchat.dart'; import 'package:jema_app/teacherchat.dart';
import 'package:jema_app/classroomview.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 { class TeacherHomePage extends StatelessWidget {
late User? user; late User? user;
......
...@@ -35,11 +35,13 @@ dependencies: ...@@ -35,11 +35,13 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2 cupertino_icons: ^1.0.2
image_picker: ^0.8.0
firebase_core: ^2.24.2 firebase_core: ^2.24.2
firebase_auth: ^4.15.3 firebase_auth: ^4.15.3
cloud_firestore: ^4.13.6 cloud_firestore: ^4.13.6
awesome_dialog: ^3.1.0 awesome_dialog: ^3.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
...@@ -76,6 +78,10 @@ flutter: ...@@ -76,6 +78,10 @@ flutter:
- lib/assets/Vector 2.png - lib/assets/Vector 2.png
- lib/assets/Vector22.png - lib/assets/Vector22.png
- lib/assets/Vector23.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