Update: 2026-08-01 05:29:35

This commit is contained in:
Hamza-Ayed
2026-08-01 05:29:35 +03:00
parent 782138ef7b
commit 84c725040f
8 changed files with 40 additions and 28 deletions
@@ -320,11 +320,13 @@ class UserHeader extends StatelessWidget {
fontSize: 18,
shadows: [Shadow(blurRadius: 2, color: Colors.black26)]),
),
accountEmail:
(box.read(BoxName.emailDriver).toString().contains('siroapp') ||
box.read(BoxName.emailDriver).toString().contains('intaleqapp'))
? Text('Your email not updated yet'.tr)
: Text(box.read(BoxName.emailDriver)),
accountEmail: (box
.read(BoxName.emailDriver)
.toString()
.contains('siroapp') ||
box.read(BoxName.emailDriver).toString().contains('intaleqapp'))
? Text('Your email not updated yet'.tr)
: Text(box.read(BoxName.emailDriver)),
currentAccountPicture: GetBuilder<ImageController>(
builder: (controller) => Stack(
clipBehavior: Clip.none,
@@ -334,7 +336,8 @@ class UserHeader extends StatelessWidget {
shape: BoxShape.circle,
border: Border.all(color: Colors.white, width: 2),
boxShadow: [
BoxShadow(color: Colors.black.withValues(alpha: 0.3), blurRadius: 5)
BoxShadow(
color: Colors.black.withValues(alpha: 0.3), blurRadius: 5)
],
),
child: controller.isloading
@@ -349,13 +352,17 @@ class UserHeader extends StatelessWidget {
: null,
// [تعديل هام]: في حال فشل تحميل الصورة (غير موجودة)
onBackgroundImageError: (exception, stackTrace) {
// طباعة الخطأ في الكونسول للتوضيح
debugPrint(
"Profile image not found or error loading: $exception");
// استدعاء نافذة التنبيه
_showUploadPhotoDialog(context, controller);
},
onBackgroundImageError: (box
.read(BoxName.driverPhotoUrl)
?.toString()
.isNotEmpty ==
true)
? (exception, stackTrace) {
debugPrint(
"Profile image not found or error loading: $exception");
_showUploadPhotoDialog(context, controller);
}
: null,
// أيقونة بديلة تظهر في الخلفية إذا لم تكن الصورة موجودة
backgroundColor: Colors.grey.shade300,