feat: N1d/N2/N3 + قانون فلاتر وإعادة ضبط تطبيق السائق

الباك إند:
- تعيين أول أدمن صار يُنشئ المستخدم إن لم يوجد — كان يشترط دخولاً سابقاً،
  وهي بيضة ودجاجة تمنع الدخول إلى لوحة أي مستأجر جديد أصلاً.
- OTP_DEV_MODE كان يفشل مفتوحاً (`!== 'false'`): غياب المتغيّر أو خطأ مطبعي
  يترك الإنتاج برمز ثابت يفتح كل حساب، ويحرس السحب المالي كذلك. صار
  `=== 'true'` في الإعداد وفي قارئَيه، مع تحذير عند الإقلاع.
- N2: التحقّق من اللوغو عند الرفع (PNG/JPEG · 512+ · مربّع · سقف 5MB) عبر
  قراءة الترويسة بلا اعتمادية — بدل اكتشاف أيقونة ممطوطة بعد النشر.

N3: السكربت يولّد build_config.dart بأعلام const (طبقات docs/22 §1.5)،
ويضبط bundle IDs واسم التطبيق والأيقونات/splash، و--build يشغّل Shorebird.

فلاتر:
- docs/23: قانون مُلزِم للتطبيقين (البنية · Cubit · طبقة الشبكة · الأعلام).
- السائق: أُزيل Dart القديم (GetX) مع الإبقاء على الأصيل والإضافات وشهادات
  التوقيع وShorebird وFirebase الخاص به، وأُعيد هيكلته مطابقاً للراكب.
- طبقة الشبكة ترسل x-device-id وتجدّد التوكن عند 401 مرة واحدة فقط.
- الحزم موحّدة بين التطبيقين، والـAPI https حصراً في الاثنين.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Hamza-Ayed
2026-07-18 13:06:46 +03:00
co-authored by Claude Fable 5
parent 3ab74a13a8
commit de4bbd00ac
271 changed files with 1333 additions and 81068 deletions
@@ -1,167 +0,0 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'dart:math' as math;
class DriverVerificationScreen extends StatefulWidget {
const DriverVerificationScreen({super.key});
@override
State<DriverVerificationScreen> createState() =>
_DriverVerificationScreenState();
}
class _DriverVerificationScreenState extends State<DriverVerificationScreen>
with SingleTickerProviderStateMixin {
late final AnimationController _controller;
@override
void initState() {
super.initState();
_controller = AnimationController(
vsync: this,
duration: const Duration(seconds: 2),
)..repeat();
}
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
backgroundColor: const Color(0xFFF8F9FA),
body: SafeArea(
child: Center(
child: SingleChildScrollView(
padding: const EdgeInsets.all(24.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// Animated Icon
AnimatedBuilder(
animation: _controller,
builder: (_, child) {
return Transform.rotate(
angle: _controller.value * 2 * math.pi,
child: child,
);
},
child: Icon(
Icons.sync,
size: 80,
color: theme.primaryColor.withOpacity(0.8),
),
),
const SizedBox(height: 32),
// Title
Text(
"Your Application is Under Review".tr,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 26,
fontWeight: FontWeight.bold,
color: theme.textTheme.titleLarge?.color,
),
),
const SizedBox(height: 16),
// Main Message
Text(
"We have received your application to join us as a driver. Our team is currently reviewing it. Thank you for your patience."
.tr,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 16,
color: Colors.black54,
height: 1.5,
),
),
const SizedBox(height: 32),
// Notification Card
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: theme.primaryColor.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(
color: theme.primaryColor.withOpacity(0.3),
width: 1,
),
),
child: Row(
children: [
Icon(Icons.notifications_active_outlined,
color: theme.primaryColor, size: 30),
const SizedBox(width: 16),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"You Will Be Notified".tr,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: theme.primaryColor,
),
),
const SizedBox(height: 4),
Text(
"We will send you a notification as soon as your account is approved. You can safely close this page, and we'll let you know when the review is complete."
.tr,
style: const TextStyle(
fontSize: 14,
color: Colors.black87,
height: 1.4,
),
),
],
),
),
],
),
),
const SizedBox(height: 40),
// Refresh Button
// ElevatedButton.icon(
// onPressed: () {
// // TODO: Add logic to check status from your API
// Get.snackbar(
// "Status", // This can also be a key if you want
// "Checking for updates...".tr,
// snackPosition: SnackPosition.BOTTOM,
// );
// },
// icon: const Icon(Icons.refresh, color: Colors.white),
// label: Text(
// "Refresh Status".tr,
// style: const TextStyle(fontSize: 16, color: Colors.white),
// ),
// style: ElevatedButton.styleFrom(
// backgroundColor: theme.primaryColor,
// padding: const EdgeInsets.symmetric(
// horizontal: 40, vertical: 15),
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(30.0),
// ),
// elevation: 3,
// ),
// ),
],
),
),
),
),
);
}
}