Commit f77aa56a authored by Uditha Prabhasha 's avatar Uditha Prabhasha

updated the app, activities page

parent 31641ec2
No preview for this file type
import 'package:cloud_firestore/cloud_firestore.dart';
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';
class Attendance extends StatelessWidget {
late User? user;
late final Stream<QuerySnapshot> _usersStream;
Attendance() {
user = FirebaseAuth.instance.currentUser;
initializeStreams();
}
void initializeStreams() {
_usersStream = FirebaseFirestore.instance
.collection('classroom')
.where('userId', isEqualTo: user?.uid)
.snapshots();
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
// Disable the back button press
return false;
},
child: Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.of(context).pop();
},
),
actions: [
Text(
'Attendance',
style: TextStyle(
color: Color(0xFF554994),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.04,
letterSpacing: -0.96,
),
)
],
),
body: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bright Sparkle ',
style: TextStyle(
color: Color(0xFF11324D),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.04,
letterSpacing: -0.96,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(5, 40, 5, 5),
child: Container(
width: 358,
height: 76,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Today’s Present Count',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
),
),
const SizedBox(height: 20),
Container(
width: double.infinity,
height: 40,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: double.infinity,
padding: const EdgeInsets.symmetric(
horizontal: 21, vertical: 12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 0),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Male',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
const SizedBox(width: 2),
SizedBox(
width: 30,
child: TextField(
decoration: InputDecoration(
labelText: '06',
border: OutlineInputBorder(),
),
),
),
],
),
),
const SizedBox(width: 2),
Container(
height: double.infinity,
padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 0),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Female',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
const SizedBox(width: 2),
SizedBox(
width: 30,
child: TextField(
decoration: InputDecoration(
labelText: '06',
border: OutlineInputBorder(),
),
),
),
],
),
),
const SizedBox(width: 14),
Container(
height: double.infinity,
padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Color(0xFF48B62C),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
SizedBox(
width: 53,
child: Text(
'All',
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
),
const SizedBox(width: 3),
Text(
'12',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
height: 0.06,
),
),
],
),
),
],
),
),
],
),
)),
Padding(
padding: const EdgeInsets.fromLTRB(5, 5, 5, 5),
child: Container(
width: 358,
height: 76,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Today’s Absent Count',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
),
),
const SizedBox(height: 20),
Container(
width: double.infinity,
height: 40,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: double.infinity,
padding: const EdgeInsets.symmetric(
horizontal: 21, vertical: 12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 0),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Male',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
const SizedBox(width: 2),
SizedBox(
width: 30,
child: TextField(
decoration: InputDecoration(
labelText: '06',
border: OutlineInputBorder(),
),
),
),
],
),
),
const SizedBox(width: 2),
Container(
height: double.infinity,
padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 0),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Text(
'Female',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
const SizedBox(width: 2),
SizedBox(
width: 30,
child: TextField(
decoration: InputDecoration(
labelText: '06',
border: OutlineInputBorder(),
),
),
),
],
),
),
const SizedBox(width: 14),
Container(
height: double.infinity,
padding: const EdgeInsets.all(12),
decoration: ShapeDecoration(
color: Color(0xFFEF4B4B),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 1,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
SizedBox(
width: 53,
child: Text(
'All',
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
),
const SizedBox(width: 3),
Text(
'12',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
height: 0.06,
),
),
],
),
),
],
),
),
],
),
)),
Padding(
padding: const EdgeInsets.fromLTRB(5, 5, 0, 5),
child: Container(
width: 358,
height: 362,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Attendance Summary ',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
),
),
],
),
),
const SizedBox(height: 30),
Container(
width: double.infinity,
height: 316,
padding: const EdgeInsets.only(
top: 16,
left: 18,
right: 17,
bottom: 18,
),
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 3,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 300,
height: 282,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
SizedBox(
width: 157,
height: 13,
child: Text(
'Attendance ',
style: TextStyle(
color: Color(0xFF2B3674),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
height: 0.07,
letterSpacing: -0.28,
),
),
),
],
),
),
Center(
child: Container(
width: 150,
height: 150,
child: Stack(
children: [
Positioned(
left: 0,
top: 150,
child: Transform(
transform: Matrix4.identity()
..translate(0.0, 0.0)
..rotateZ(-1.4),
child: Container(
width: 150,
height: 150,
decoration: ShapeDecoration(
color: Color.fromARGB(
255, 34, 177, 16),
shape: OvalBorder(),
),
),
),
),
Positioned(
left: 0,
top: 150,
child: Transform(
transform: Matrix4.identity()
..translate(0.0, 0.0)
..rotateZ(-1.5),
child: Container(
width: 150,
height: 150,
decoration: ShapeDecoration(
color: Color.fromARGB(
255, 180, 124, 13),
shape: OvalBorder(),
),
),
),
),
Positioned(
left: 0,
top: 150,
child: Transform(
transform: Matrix4.identity()
..translate(0.0, 0.0)
..rotateZ(-1.7),
child: Container(
width: 150,
height: 150,
decoration: ShapeDecoration(
color: Color.fromARGB(
255, 38, 138, 232),
shape: OvalBorder(),
),
),
),
),
],
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(
10, 30, 0, 0),
child: Container(
width: 323,
height: 75,
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(12),
),
shadows: [
BoxShadow(
color: Color(0x1E7090B0),
blurRadius: 40,
offset: Offset(0, 18),
spreadRadius: 0,
)
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
height: 37,
child: Column(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Padding(
padding: const EdgeInsets
.fromLTRB(
0, 20, 0, 0),
child: Container(
width: double.infinity,
height: 10,
child: Row(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment
.start,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Container(
width: 8,
height: 8,
decoration:
ShapeDecoration(
color: Color(
0xFF53ACFF),
shape:
OvalBorder(),
),
),
const SizedBox(
width: 5),
SizedBox(
width: 55,
height: 10,
child: Text(
'Present',
style:
TextStyle(
color: Color(
0xFF21205B),
fontSize: 14,
fontFamily:
'Poppins',
fontWeight:
FontWeight
.w500,
height: 0.07,
letterSpacing:
-0.28,
),
),
),
const SizedBox(
height: 1),
Text(
'75%',
style: TextStyle(
color: Color(
0xFF2B3674),
fontSize: 18,
fontFamily:
'Poppins',
fontWeight:
FontWeight
.w600,
height: 0.06,
letterSpacing:
-0.36,
),
),
],
),
),
),
],
),
),
Container(
height: 37,
child: Column(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
width: double.infinity,
height: 10,
child: Row(
mainAxisSize:
MainAxisSize.min,
crossAxisAlignment:
CrossAxisAlignment
.start,
children: [
Container(
width: 8,
height: 8,
decoration:
ShapeDecoration(
color: Color(
0xFF6AD2FF),
shape:
OvalBorder(),
),
),
const SizedBox(
width: 5),
SizedBox(
width: 51,
height: 10,
child: Text(
'Absent',
style: TextStyle(
color: Color(
0xFF21205B),
fontSize: 14,
fontFamily:
'Poppins',
fontWeight:
FontWeight
.w500,
height: 0.07,
letterSpacing:
-0.28,
),
),
),
const SizedBox(
height: 2),
SizedBox(
width: 37,
height: 16,
child: Text(
'25%',
style: TextStyle(
color: Color(
0xFF2B3674),
fontSize: 18,
fontFamily:
'Poppins',
fontWeight:
FontWeight
.w600,
height: 0.06,
letterSpacing:
-0.36,
),
),
),
],
),
),
],
),
),
Transform(
transform: Matrix4.identity()
..translate(0.0, 0.0)
..rotateZ(-1.57),
child: Container(
width: 47,
decoration: ShapeDecoration(
shape:
RoundedRectangleBorder(
side: BorderSide(
width: 1,
strokeAlign: BorderSide
.strokeAlignCenter,
color:
Color(0xFFF4F7FE),
),
),
),
),
),
],
),
),
),
],
),
),
],
),
),
],
),
)),
],
),
),
),
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.chat),
label: 'Chat',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
selectedItemColor: Colors.blue,
onTap: (index) {
// Handle bottom navigation item tap
if (index == 1) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => TeacherChatPage()),
);
}
},
),
),
);
}
}
import 'package:cloud_firestore/cloud_firestore.dart';
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 'childrenProfile.dart'; // Import the AddClassroomPage file
class ChildrenHomePage extends StatelessWidget {
late User? user;
late final Stream<QuerySnapshot> _usersStream;
ChildrenHomePage() {
user = FirebaseAuth.instance.currentUser;
initializeStreams();
}
void initializeStreams() {
_usersStream = FirebaseFirestore.instance
.collection('classroom')
.where('userId', isEqualTo: user?.uid)
.snapshots();
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
// Disable the back button press
return false;
},
child: Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.of(context).pop();
},
),
actions: [
Text(
'Children',
style: TextStyle(
color: Color(0xFF554994),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.04,
letterSpacing: -0.96,
),
)
],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bright Sparkle ',
style: TextStyle(
color: Color(0xFF11324D),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.04,
letterSpacing: -0.96,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(20, 40, 20, 20),
child: Container(
width: 293,
height: 44,
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 4,
offset: Offset(0, 1),
spreadRadius: 0,
),
],
),
child: TextField(
decoration: InputDecoration(
hintText: 'Search',
border: InputBorder.none,
icon: Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(Icons.search),
),
suffixIcon: Icon(Icons.mic),
contentPadding: EdgeInsets.all(8),
),
),
),
),
Expanded(
child: StreamBuilder<QuerySnapshot>(
stream: _usersStream,
builder: (context, snapshot) {
print("--------------------------------------");
print(snapshot.data!.docs.length);
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
}
if (snapshot.hasError) {
return Text('Error: ${snapshot.error}');
}
var itemcount = snapshot.data!.docs.length;
return ListView.builder(
itemCount: snapshot.data!.docs.length,
itemBuilder: (context, index) {
var document = snapshot.data!.docs[index];
var name = document['className'];
var className = document['className'];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: 358,
height: 77,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
width: 77,
height: 77,
decoration: ShapeDecoration(
image: DecorationImage(
image: AssetImage(
"lib/assets/tsignup1.png"),
fit: BoxFit.fill,
),
shape: OvalBorder(),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 12.32,
offset: Offset(0, 3.08),
spreadRadius: 0,
)
],
),
),
const SizedBox(width: 15),
Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
name,
style: TextStyle(
color: Colors.black,
fontSize: 20,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
letterSpacing: -0.80,
),
),
const SizedBox(height: 10),
Padding(
padding:
const EdgeInsets.all(8.0),
child: Text(
'Class Room 01',
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w300,
height: 0.08,
letterSpacing: -0.56,
),
),
),
],
),
),
],
),
),
const SizedBox(width: 70),
InkWell(
onTap: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (_) => ChildrenProfilePage(),
),
);
},
child: Container(
width: 75,
height: 36,
padding: const EdgeInsets.symmetric(
horizontal: 20, vertical: 12),
decoration: ShapeDecoration(
color: Color(0xFFB983FF),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(4)),
),
child: Text(
'View',
style: TextStyle(
color: Colors.white,
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
height: 1,
),
textAlign: TextAlign.center,
),
),
),
],
),
),
);
},
);
},
),
),
],
),
),
),
);
}
}
import 'package:flutter/material.dart';
class ActivitiesPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Activities'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TextField(
decoration: InputDecoration(
hintText: 'Search...',
prefixIcon: Icon(Icons.search),
border: OutlineInputBorder(),
),
),
SizedBox(height: 20),
Row(
children: [
Expanded(
child: CameraActivityBox(
title: 'Photo',
icon: Icons.photo,
cameraType: CameraType.photo,
),
),
SizedBox(width: 16),
Expanded(
child: CameraActivityBox(
title: 'Video',
icon: Icons.video_library,
cameraType: CameraType.video,
),
),
],
),
SizedBox(height: 20),
Row(
children: [
Expanded(
child: ActivityBox(
title: 'Social Activities',
icon: Icons.group,
),
),
SizedBox(width: 16),
Expanded(
child: ActivityBox(
title: 'Whiteboard',
icon: Icons.border_color,
),
),
],
),
SizedBox(height: 20),
Row(
children: [
Expanded(
child: ActivityBox(
title: 'Kid Activity',
icon: Icons.child_care,
),
),
],
),
],
),
),
);
}
}
class ActivityBox extends StatelessWidget {
final String title;
final IconData icon;
final Function()? onTap;
const ActivityBox({
Key? key,
required this.title,
required this.icon,
this.onTap,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
height: 100,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(10),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
icon,
size: 40,
color: Colors.blue,
),
SizedBox(height: 5),
Text(
title,
textAlign: TextAlign.center,
style: TextStyle(
fontWeight: FontWeight.bold,
),
),
],
),
),
);
}
}
enum CameraType { photo, video }
class CameraActivityBox extends StatelessWidget {
final String title;
final IconData icon;
final CameraType cameraType;
const CameraActivityBox({
Key? key,
required this.title,
required this.icon,
required this.cameraType,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return ActivityBox(
title: title,
icon: icon,
onTap: () {
// Navigate to the camera screen based on the camera type
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CameraScreen(cameraType: cameraType),
),
);
},
);
}
}
class CameraScreen extends StatelessWidget {
final CameraType cameraType;
const CameraScreen({Key? key, required this.cameraType}) : super(key: key);
@override
Widget build(BuildContext context) {
// Implement your camera screen UI here
return Scaffold(
appBar: AppBar(
title: Text(cameraType == CameraType.photo ? 'Take Photo' : 'Record Video'),
),
body: Center(
child: Text('Camera Screen Placeholder'),
),
);
}
}
......@@ -6,8 +6,33 @@ class AddStudentPage extends StatefulWidget {
}
class _AddStudentPageState extends State<AddStudentPage> {
String _selectedSex = 'Male';
bool _isSpecialNeedsChild = false;
String firstName = '';
String lastName = '';
DateTime? birthday;
String sex = '';
String imagePath = ''; // Path to the selected profile image
// Function to open the image picker
void _pickImage() {
// Implement your image picking logic (e.g., using ImagePicker)
// Update 'imagePath' with the selected image path
}
// Function to show date picker for selecting birthday
Future<void> _selectDate(BuildContext context) async {
final DateTime? picked = await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(1900),
lastDate: DateTime.now(),
);
if (picked != null && picked != birthday) {
setState(() {
birthday = picked;
});
}
}
@override
Widget build(BuildContext context) {
......@@ -15,137 +40,92 @@ class _AddStudentPageState extends State<AddStudentPage> {
appBar: AppBar(
title: Text('Add Student'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView(
body: SingleChildScrollView(
padding: EdgeInsets.all(16.0),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
CircleAvatar(
children: [
GestureDetector(
onTap: _pickImage,
child: CircleAvatar(
radius: 50,
// Add logic to handle profile image selection
// backgroundImage: AssetImage('path_to_profile_image'),
),
SizedBox(height: 16),
buildTextFormField('First Name', 'Enter first name'),
buildTextFormField('Last Name', 'Enter last name'),
buildDateOfBirthField(),
buildSexDropdown(),
buildMedicineFields(),
buildSpecialNeedsFields(),
SizedBox(height: 16),
ElevatedButton(
onPressed: () {
// Add logic to save student data
// Navigator.pop(context); // Navigate back after saving
},
child: Text('Save Student'),
),
],
backgroundImage: imagePath.isNotEmpty
? AssetImage(imagePath)
: AssetImage('lib/assets/default_profile_image.png'),
),
),
SizedBox(height: 16),
Align(
alignment: Alignment.centerLeft,
child: Text(
'Bio',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
);
}
Widget buildTextFormField(String label, String hint) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: TextFormField(
decoration: InputDecoration(
labelText: label,
hintText: hint,
),
),
);
}
Widget buildDateOfBirthField() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: TextFormField(
readOnly: true,
onTap: () async {
// Add logic to show date picker
// final DateTime picked = await showDatePicker(
// context: context,
// initialDate: DateTime.now(),
// firstDate: DateTime(2000),
// lastDate: DateTime(2101),
// );
// if (picked != null && picked != DateTime.now()) {
// // Handle the selected date
// }
SizedBox(height: 8),
TextField(
onChanged: (value) {
setState(() {
firstName = value;
});
},
decoration: InputDecoration(
labelText: 'Date of Birth',
hintText: 'Select date of birth',
decoration: InputDecoration(labelText: 'First Name'),
),
),
);
}
Widget buildSexDropdown() {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: DropdownButtonFormField<String>(
value: _selectedSex,
SizedBox(height: 8),
TextField(
onChanged: (value) {
setState(() {
_selectedSex = value!;
lastName = value;
});
},
items: ['Male', 'Female'].map((sex) {
return DropdownMenuItem<String>(
value: sex,
child: Text(sex),
);
}).toList(),
decoration: InputDecoration(labelText: 'Last Name'),
),
SizedBox(height: 8),
InkWell(
onTap: () => _selectDate(context),
child: InputDecorator(
decoration: InputDecoration(
labelText: 'Sex',
labelText: 'Birthday',
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Text(
birthday != null
? '${birthday!.day}/${birthday!.month}/${birthday!.year}'
: 'Select Birthday',
),
);
}
Widget buildMedicineFields() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
buildTextFormField('Doctor Name', 'Enter doctor name'),
buildTextFormField('Doctor Phone', 'Enter doctor phone'),
buildTextFormField('Allergies', 'Enter allergies'),
buildTextFormField('Medicine', 'Enter medicine'),
Icon(Icons.calendar_today),
],
);
}
Widget buildSpecialNeedsFields() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text('Special Needs Child: '),
Checkbox(
value: _isSpecialNeedsChild,
),
),
),
SizedBox(height: 8),
TextField(
onChanged: (value) {
setState(() {
_isSpecialNeedsChild = value!;
sex = value;
});
},
decoration: InputDecoration(labelText: 'Sex'),
),
],
SizedBox(height: 16),
ElevatedButton(
onPressed: () {
// Add student to the classroom logic
// You can use 'firstName', 'lastName', 'birthday', 'sex', 'imagePath'
},
child: Text('Add Student'),
),
if (_isSpecialNeedsChild)
buildTextFormField('Special Note', 'Enter special note'),
],
),
),
),
);
}
}
void main() {
runApp(MaterialApp(
home: AddStudentPage(),
));
}
import 'package:cloud_firestore/cloud_firestore.dart';
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
class ChildrenProfilePage extends StatelessWidget {
late User? user;
late final Stream<QuerySnapshot> _usersStream;
ChildrenProfilePage() {
user = FirebaseAuth.instance.currentUser;
initializeStreams();
}
void initializeStreams() {
_usersStream = FirebaseFirestore.instance
.collection('classroom')
.where('userId', isEqualTo: user?.uid)
.snapshots();
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
// Disable the back button press
return false;
},
child: Scaffold(
appBar: AppBar(
leading: IconButton(
icon: Icon(Icons.arrow_back),
onPressed: () {
Navigator.of(context).pop();
},
),
actions: [
Text(
'Children',
style: TextStyle(
color: Color(0xFF554994),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.04,
letterSpacing: -0.96,
),
)
],
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Bright Sparkle ',
style: TextStyle(
color: Color(0xFF11324D),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.04,
letterSpacing: -0.96,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(5, 40, 5, 5),
child: Container(
width: 358,
height: 255,
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(13.64),
),
shadows: [
BoxShadow(
color: Color(0x0C000000),
blurRadius: 181.84,
offset: Offset(0, 4.55),
spreadRadius: 0,
)
],
),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding:
const EdgeInsets.fromLTRB(0, 10, 0, 0),
child: Container(
width: 84,
height: 84,
decoration: ShapeDecoration(
image: DecorationImage(
image: AssetImage(
"lib/assets/Ellipse 8.png"),
fit: BoxFit.fill,
),
shape: OvalBorder(),
),
),
),
const SizedBox(height: 11),
Container(
width: double.infinity,
height: 20,
padding: const EdgeInsets.only(
left: 45, right: 43),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
width: 124,
height: double.infinity,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'David Smith',
style: TextStyle(
color: Color(0xFF11324D),
fontSize: 20,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
letterSpacing: -0.80,
),
),
const SizedBox(width: 3),
Container(
width: 7,
height: 7,
decoration: ShapeDecoration(
color: Color(0xFF00E332),
shape: OvalBorder(),
),
),
],
),
),
],
),
),
const SizedBox(height: 11),
Text(
'Student',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
),
),
const SizedBox(height: 11),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.infinity,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Age',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
),
),
TextSpan(
text: ' : ',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: '05',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
),
],
),
),
const SizedBox(width: 17),
Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Birthday',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
),
),
TextSpan(
text: ' : ',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: '12. 02. 2019',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
),
],
),
),
const SizedBox(width: 17),
Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Gender',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w400,
),
),
TextSpan(
text: ' : ',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: 'Male',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 14,
fontFamily: 'Poppins',
fontWeight: FontWeight.w600,
),
),
],
),
),
],
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(
50, 20, 40, 0),
child: Container(
width: 302,
height: 37,
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Container(
padding: const EdgeInsets.only(
top: 12,
left: 10,
bottom: 11.63,
),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(6)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 4,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Center(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
height: double.infinity,
child: Row(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment
.start,
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
Icon(
Icons.chat,
color: Colors.black26,
),
Text(
'Chat',
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontFamily:
'Poppins',
fontWeight:
FontWeight.w400,
height: 0.08,
),
),
const SizedBox(
width: 10),
],
),
),
],
),
),
),
const SizedBox(width: 16),
Container(
padding: const EdgeInsets.only(
top: 12,
left: 10,
bottom: 11.63,
),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(6)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 4,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
height: double.infinity,
child: Row(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
Icon(
Icons.call,
color: Colors.black26,
),
Text(
'Call',
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontFamily: 'Poppins',
fontWeight:
FontWeight.w400,
height: 0.08,
),
),
const SizedBox(width: 10),
],
),
),
],
),
),
const SizedBox(width: 16),
Container(
padding: const EdgeInsets.only(
top: 11,
bottom: 12,
),
decoration: ShapeDecoration(
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(6)),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 4,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.center,
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
height: double.infinity,
child: Row(
mainAxisSize:
MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment
.center,
crossAxisAlignment:
CrossAxisAlignment
.center,
children: [
Icon(
Icons.book,
color: Colors.black26,
),
Text(
'Activites',
style: TextStyle(
color: Colors.black,
fontSize: 12,
fontFamily: 'Poppins',
fontWeight:
FontWeight.w400,
),
),
const SizedBox(width: 10),
],
),
),
],
),
),
],
),
),
)
],
),
),
],
),
))),
Padding(
padding: const EdgeInsets.fromLTRB(8, 30, 0, 0),
child: SingleChildScrollView(
child: Container(
width: 358,
height: 171,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Report',
style: TextStyle(
color: Color(0xFF21205B),
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.06,
),
),
const SizedBox(height: 20),
SingleChildScrollView(
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(width: 18),
Container(
width: 150,
height: 135,
child: Stack(
children: [
Positioned(
left: 0,
top: 0,
child: Container(
width: 170,
height: 135,
decoration: ShapeDecoration(
color: Color(0xFFF1EFFF),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8.44),
),
),
),
),
Positioned(
left: 16,
top: 17,
child: Container(
width: 119.18,
height: 100.88,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding:
const EdgeInsets.fromLTRB(
0, 0, 0, 10),
child: Container(
width: 16.88,
height: 16.88,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(),
child: Stack(children: [
Icon(
Icons.book,
color: Colors.black26,
),
]),
),
),
const SizedBox(height: 1),
SizedBox(
width: 119.18,
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Monthly \n ',
style: TextStyle(
color:
Color(0xFF403572),
fontSize: 14,
fontFamily: 'Roboto',
fontWeight:
FontWeight.w500,
height: 0.09,
),
),
],
),
),
),
const SizedBox(height: 12),
SizedBox(
width: 119.18,
child: Opacity(
opacity: 0.70,
child: Text(
'Some short description of this type of report.',
style: TextStyle(
color: Color(0xFF8DAEAE),
fontSize: 10.55,
fontFamily: 'Roboto',
fontWeight: FontWeight.w400,
height: 0,
),
),
),
),
],
),
),
),
],
),
),
const SizedBox(width: 18),
Container(
width: 150,
height: 135,
child: Stack(
children: [
Positioned(
left: 0,
top: 0,
child: Container(
width: 170,
height: 135,
decoration: ShapeDecoration(
color: Color(0xFFC4F3F3),
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(8.44),
),
),
),
),
Positioned(
left: 16,
top: 17,
child: Container(
width: 119.18,
height: 100.88,
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding:
const EdgeInsets.fromLTRB(
0, 0, 0, 10),
child: Container(
width: 16.88,
height: 16.88,
clipBehavior: Clip.antiAlias,
decoration: BoxDecoration(),
child: Stack(children: [
Icon(
Icons.book,
color: Colors.black26,
),
]),
),
),
const SizedBox(height: 1),
SizedBox(
width: 119.18,
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Monthly \n',
style: TextStyle(
color:
Color(0xFF479696),
fontSize: 14,
fontFamily: 'Roboto',
fontWeight:
FontWeight.w500,
height: 0.09,
),
),
],
),
),
),
const SizedBox(height: 12),
SizedBox(
width: 119.18,
child: Opacity(
opacity: 0.70,
child: Text(
'Some short description of this type of report.',
style: TextStyle(
color: Color(0xFF8DAEAE),
fontSize: 10.55,
fontFamily: 'Roboto',
fontWeight: FontWeight.w400,
height: 0,
),
),
),
),
],
),
),
),
],
),
),
],
),
),
],
),
),
),
)
],
),
),
bottomNavigationBar: BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.home),
label: 'Home',
),
BottomNavigationBarItem(
icon: Icon(Icons.chat),
label: 'Chat',
),
BottomNavigationBarItem(
icon: Icon(Icons.person),
label: 'Profile',
),
],
selectedItemColor: Colors.blue,
onTap: (index) {
// Handle bottom navigation item tap
if (index == 1) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => TeacherChatPage()),
);
}
},
),
),
);
}
}
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:jema_app/Attendance.dart';
import 'ChildrenHomePage.dart';
import 'activities.dart';
import 'addstudent.dart';
class ClassroomViewPage extends StatelessWidget {
......@@ -58,7 +61,7 @@ class ClassroomViewPage extends StatelessWidget {
TextField(
decoration: InputDecoration(
hintText: 'Search...',
suffixIcon: Icon(Icons.search),
prefixIcon: Icon(Icons.search),
border: OutlineInputBorder(),
),
),
......@@ -68,7 +71,14 @@ class ClassroomViewPage extends StatelessWidget {
childAspectRatio: (1 / 0.6),
shrinkWrap: true,
children: [
Padding(
//Children
GestureDetector(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => ChildrenHomePage(),
));
},
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
......@@ -101,7 +111,8 @@ class ClassroomViewPage extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Children',
......@@ -150,25 +161,31 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
// Add Image widget inside the Stack
Positioned(
right: 0,
bottom: 0,
child: Image.asset(
"lib/assets/Vector 2.png", // Replace with your image URL
"lib/assets/Vector 2.png",
width:
59, // Set the width as per your requirement
59,
height:
81, // Set the height as per your requirement
81,
fit: BoxFit
.cover, // Adjust the BoxFit property as needed
.cover,
),
),
],
),
),
),
Padding(
),
GestureDetector(
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => Attendance(),
));
},
child: Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
......@@ -201,7 +218,8 @@ class ClassroomViewPage extends StatelessWidget {
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Attendance',
......@@ -254,7 +272,7 @@ class ClassroomViewPage extends StatelessWidget {
right: 8,
bottom: 8,
child: Image.asset(
"lib/assets/Vector22.png", // Replace with your image URL
"lib/assets/Vector22.png",
width: 59,
height: 81,
fit: BoxFit.cover,
......@@ -264,8 +282,16 @@ class ClassroomViewPage extends StatelessWidget {
),
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ActivitiesPage()),
);
},
child: Container(
width: 170,
height: 85,
......@@ -319,7 +345,223 @@ class ClassroomViewPage extends StatelessWidget {
right: 8,
bottom: 8,
child: Image.asset(
"lib/assets/Vector23.png", // Replace with your image URL
"lib/assets/Vector23.png",
width: 59,
height: 81,
fit: BoxFit.cover,
),
),
],
),
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
height: 85,
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(1.00, -0.01),
end: Alignment(-1, 0.01),
colors: [Color(0xFF03BB9A), Color(0xFF08EBC3)],
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 2,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Stack(
children: [
Positioned(
left: 8,
top: 35,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
' Check In',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.06,
letterSpacing: -0.64,
),
),
const SizedBox(height: 8),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text.rich(
TextSpan(
children: [
TextSpan(
text: 'Check Out ',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w500,
height: 0.07,
letterSpacing: -0.56,
),
),
],
),
),
),
],
),
),
),
Positioned(
right: 8,
bottom: 8,
child: Image.asset(
"lib/assets/Vector24.png",
width: 59,
height: 81,
fit: BoxFit.cover,
),
),
],
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
height: 85,
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(1.00, -0.01),
end: Alignment(-1, 0.01),
colors: [Color(0xFF079DF2), Color(0xFF7ED0FF)],
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 2,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Stack(
children: [
Positioned(
left: 8,
top: 35,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Calendar',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.06,
letterSpacing: -0.64,
),
),
const SizedBox(height: 8),
],
),
),
),
Positioned(
right: 8,
bottom: 8,
child: Image.asset(
"lib/assets/Vector25.png",
width: 59,
height: 81,
fit: BoxFit.cover,
),
),
],
),
),
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
width: 170,
height: 85,
clipBehavior: Clip.antiAlias,
decoration: ShapeDecoration(
gradient: LinearGradient(
begin: Alignment(1.00, -0.01),
end: Alignment(-1, 0.01),
colors: [Color(0xFF50AE59), Color(0xFF90FC9A)],
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
shadows: [
BoxShadow(
color: Color(0x3F000000),
blurRadius: 2,
offset: Offset(0, 1),
spreadRadius: 0,
)
],
),
child: Stack(
children: [
Positioned(
left: 8,
top: 35,
child: Container(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Report',
style: TextStyle(
color: Colors.white,
fontSize: 16,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.06,
letterSpacing: -0.64,
),
),
const SizedBox(height: 8),
],
),
),
),
Positioned(
right: 8,
bottom: 8,
child: Image.asset(
"lib/assets/Vector26.png",
width: 59,
height: 81,
fit: BoxFit.cover,
......
......@@ -241,11 +241,3 @@ class _LoginPage extends State<LoginPage> {
}
}
}
void main() {
runApp(const MaterialApp(
home: LoginPage(
backgroundColor: Color.fromARGB(255, 225, 226, 226),
),
));
}
......@@ -104,11 +104,3 @@ class SignInUpPage extends StatelessWidget {
);
}
}
void main() {
runApp(const MaterialApp(
home: SignInUpPage(
backgroundColor: Color.fromARGB(255, 225, 226, 226),
),
));
}
import 'package:flutter/material.dart';
class TeacherActivitiesPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Activities'),
),
body: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 20),
Text(
'Activities',
style: TextStyle(
color: Color(0xFF554994),
fontSize: 24,
fontFamily: 'Poppins',
fontWeight: FontWeight.w700,
height: 0.04,
letterSpacing: -0.96,
),
),
SizedBox(height: 20),
// Your activities widgets here
// ...
],
),
),
);
}
}
......@@ -99,9 +99,3 @@ class ChatItem extends StatelessWidget {
);
}
}
void main() {
runApp(MaterialApp(
home: TeacherChatPage(),
));
}
......@@ -299,9 +299,3 @@ class AdditionalInfoPage extends StatelessWidget {
);
}
}
void main() {
runApp(MaterialApp(
home: TeacherSignupPage(),
));
}
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