Skip to main content

Teachers

Teacher Directory

GET /parent/teacher/get-teachers?studentId={id}
{
"data": {
"teachers": [
{
"id": "uuid",
"name": "Mr. R. Kumar",
"designation": "Mathematics Teacher",
"phone": "+919876543210",
"email": "r.kumar@school.edu",
"photoUrl": "https://cdn.syncad.in/teachers/uuid.jpg",
"subjects": ["Mathematics", "Physics"],
"classTeacherOf": "Class 5-A"
}
]
}
}

Teacher Detail

GET /parent/teacher/{teacherId}

Returns full teacher profile with assigned subjects and classes.

UI — Teacher Card

class TeacherCard extends StatelessWidget {
final Teacher teacher;

@override
Widget build(BuildContext context) {
return Card(
child: ListTile(
leading: CircleAvatar(
backgroundImage: teacher.photoUrl != null
? NetworkImage(teacher.photoUrl!)
: null,
child: teacher.photoUrl == null
? const Icon(Icons.person)
: null,
),
title: Text(teacher.name),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(teacher.designation),
if (teacher.classTeacherOf != null)
Text('Class Teacher: ${teacher.classTeacherOf}',
style: const TextStyle(color: Colors.blue, fontSize: 12)),
],
),
trailing: IconButton(
icon: const Icon(Icons.message),
onPressed: () => Navigator.pushNamed('/message', arguments: teacher),
),
isThreeLine: true,
),
);
}
}

Send Message from Teacher Profile

Tapping the message icon pre-fills the recipient:

Navigator.pushNamed(
context,
'/message/compose',
arguments: {'recipientId': teacher.id, 'recipientName': teacher.name},
);