service 2-5-26-2
This commit is contained in:
@@ -24,10 +24,12 @@ class DriverPage extends StatelessWidget {
|
||||
child: ListView(
|
||||
children: [
|
||||
_buildDriverInfoSection(data),
|
||||
_buildCommunicationSection(data, context),
|
||||
_buildStatisticsSection(data),
|
||||
_buildCarInfoSection(data),
|
||||
_buildLicenseInfoSection(data),
|
||||
_buildBankInfoSection(data),
|
||||
const SizedBox(height: 40),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -175,4 +177,50 @@ class DriverPage extends StatelessWidget {
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildCommunicationSection(Map data, BuildContext context) {
|
||||
String phone = data['phone'] ?? '';
|
||||
String name = data['first_name'] ?? '';
|
||||
|
||||
return CupertinoListSection.insetGrouped(
|
||||
header: Text('Quick Communication'.tr),
|
||||
children: [
|
||||
CupertinoListTile(
|
||||
title: Text('Call Driver'.tr),
|
||||
leading: const Icon(CupertinoIcons.phone_fill, color: Colors.green),
|
||||
onTap: () => mainController.makePhoneCall(phone),
|
||||
),
|
||||
CupertinoListTile(
|
||||
title: Text('WhatsApp: Activation'.tr),
|
||||
leading: const Icon(Icons.send, color: Colors.green),
|
||||
onTap: () => mainController.launchCommunication(
|
||||
'whatsapp',
|
||||
phone,
|
||||
'أهلاً بك يا كابتن $name في انطلق! تم تفعيل حسابك بنجاح وأصبحت مستعداً لاستقبال الرحلات.',
|
||||
),
|
||||
),
|
||||
CupertinoListTile(
|
||||
title: Text('WhatsApp: Missing Docs'.tr),
|
||||
leading: const Icon(Icons.send, color: Colors.orange),
|
||||
onTap: () => mainController.launchCommunication(
|
||||
'whatsapp',
|
||||
phone,
|
||||
'مرحباً كابتن $name، يرجى تزويدنا بالأوراق الناقصة أو غير الواضحة عبر الواتساب لإكمال تفعيل حسابك.',
|
||||
),
|
||||
),
|
||||
CupertinoListTile(
|
||||
title: Text('WhatsApp: Support'.tr),
|
||||
leading: const Icon(Icons.send, color: Colors.blue),
|
||||
onTap: () => mainController.launchCommunication(
|
||||
'whatsapp',
|
||||
phone,
|
||||
'مرحباً كابتن $name، معك الدعم الفني من شركة انطلق. كيف يمكنني مساعدتك اليوم؟',
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user