Update: 2026-08-08 14:09:20
This commit is contained in:
@@ -140,14 +140,39 @@ class DriverInsurancePage extends StatelessWidget {
|
||||
// ── الخطط المتاحة ──────────────────────────────────────────
|
||||
List<Widget> _plansView(BuildContext context, DriverInsuranceController c) {
|
||||
if (c.plans.isEmpty) {
|
||||
// الصفحة كانت تبدو "معطّلة" لأنها تعرض عنواناً واحداً بلا سبب.
|
||||
// الحالة الحقيقية: لا خطط مُفعّلة بعد لدى الشركاء — لا خطأ ولا
|
||||
// نقص أهلية — ونقولها صراحة حتى لا يظن الكابتن أن التطبيق خربان.
|
||||
return [
|
||||
const SizedBox(height: 80),
|
||||
const SizedBox(height: 72),
|
||||
Icon(Icons.health_and_safety_outlined,
|
||||
size: 80, color: Colors.grey.shade400),
|
||||
const SizedBox(height: 16),
|
||||
Text('No insurance plans available yet'.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(fontSize: 18, color: Colors.grey)),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Colors.grey)),
|
||||
const SizedBox(height: 10),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24),
|
||||
child: Text(
|
||||
'Insurance plans have not been launched in your area yet. Once a partner plan is available it will appear here automatically.'
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14, height: 1.5, color: Colors.grey.shade600),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Center(
|
||||
child: TextButton.icon(
|
||||
onPressed: c.isLoading.value ? null : () => c.refreshAll(),
|
||||
icon: const Icon(Icons.refresh_rounded, size: 18),
|
||||
label: Text('Refresh'.tr),
|
||||
),
|
||||
),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user