Update Saqel Platform: 2026-09-08 17:51:07

This commit is contained in:
Hamza-Ayed
2026-09-08 17:51:07 +03:00
parent 902cf00152
commit 75451ebc3f
12 changed files with 84 additions and 39 deletions
@@ -86,14 +86,14 @@ class TeacherAuthCubit extends Cubit<TeacherAuthState> {
try {
final res = await repository.verifyOtp(phoneNumber, otp, fullName: fullName);
if (res['status'] == 'success') {
if (specialization != null || schoolName != null || gradesTaught != null) {
if ((fullName ?? '').trim().isNotEmpty && (specialization ?? '').trim().isNotEmpty && (schoolName ?? '').trim().isNotEmpty && (gradesTaught?.isNotEmpty ?? false)) {
try {
await repository.setupProfile(
fullName: fullName ?? 'المعلم المعتمد',
specialization: specialization ?? 'الفيزياء والعلوم التطبيقية',
schoolName: schoolName ?? 'مدرسة الملك عبد الله الثاني للتميز',
gradesTaught: gradesTaught ?? ['الصف العاشر الأساسي'],
bio: 'معلم معتمد في منصة صقل للتعليم التفاعلي',
fullName: fullName!.trim(),
specialization: specialization!.trim(),
schoolName: schoolName!.trim(),
gradesTaught: gradesTaught!,
bio: '',
);
} catch (_) {}
}