Initial commit for Intaleq Driver

This commit is contained in:
Hamza-Ayed
2025-09-01 19:04:50 +03:00
parent 889c67a691
commit 8c7f3e3a75
46 changed files with 4300 additions and 6192 deletions

View File

@@ -35,7 +35,7 @@ class ContactUsPage extends StatelessWidget {
IconButton(
onPressed: () async {
Get.put(TextToSpeechController()).speakText(
'Tripz is the safest ride-sharing app that introduces many features for both captains and passengers. We offer the lowest commission rate of just 8%, ensuring you get the best value for your rides. Our app includes insurance for the best captains, regular maintenance of cars with top engineers, and on-road services to ensure a respectful and high-quality experience for all users.'
'Intaleq is the safest ride-sharing app that introduces many features for both captains and passengers. We offer the lowest commission rate of just 15%, ensuring you get the best value for your rides. Our app includes insurance for the best captains, regular maintenance of cars with top engineers, and on-road services to ensure a respectful and high-quality experience for all users.'
.tr);
},
icon: const Icon(Icons.headphones),
@@ -43,7 +43,7 @@ class ContactUsPage extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'Tripz is the safest ride-sharing app that introduces many features for both captains and passengers. We offer the lowest commission rate of just 8%, ensuring you get the best value for your rides. Our app includes insurance for the best captains, regular maintenance of cars with top engineers, and on-road services to ensure a respectful and high-quality experience for all users.'
'Intaleq is the safest ride-sharing app that introduces many features for both captains and passengers. We offer the lowest commission rate of just 15%, ensuring you get the best value for your rides. Our app includes insurance for the best captains, regular maintenance of cars with top engineers, and on-road services to ensure a respectful and high-quality experience for all users.'
.tr,
style: AppStyle.title,
textAlign: TextAlign.center,

View File

@@ -8,10 +8,12 @@ import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import 'package:get/get.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../constant/box_name.dart';
import '../../../constant/colors.dart';
import '../../../constant/info.dart';
import '../../../constant/links.dart';
import '../../../constant/style.dart';
import '../../../controller/auth/apple_sigin.dart';
import '../../../controller/auth/captin/login_captin_controller.dart';
@@ -356,7 +358,12 @@ class LoginCaptin extends StatelessWidget {
decoration: TextDecoration.underline,
color: AppColor.blueColor,
fontWeight: FontWeight.bold),
recognizer: TapGestureRecognizer()..onTap = () {}),
recognizer: TapGestureRecognizer()
..onTap = () {
launchUrl(
Uri.parse('${AppLink.server}/privacy_policy.php'),
mode: LaunchMode.externalApplication);
}),
TextSpan(text: " and acknowledge our Privacy Policy.".tr),
],
),
@@ -369,7 +376,9 @@ class LoginCaptin extends StatelessWidget {
),
child: SingleChildScrollView(
padding: const EdgeInsets.all(12),
child: HtmlWidget(AppInformation.privacyPolicyArabic),
child: HtmlWidget(box.read(BoxName.lang).toString() == 'ar'
? AppInformation.privacyPolicyArabic
: AppInformation.privacyPolicy),
),
),
),

View File

@@ -0,0 +1,167 @@
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,
// ),
// ),
],
),
),
),
),
);
}
}

View File

@@ -72,29 +72,53 @@ class RegistrationView extends StatelessWidget {
TextFormField(
controller: c.firstNameController,
decoration: InputDecoration(
labelText: 'First Name'.tr,
border: const OutlineInputBorder()),
validator: (v) =>
(v?.isEmpty ?? true) ? 'Required field'.tr : null,
labelText: 'First Name'.tr,
border: const OutlineInputBorder(),
),
validator: (v) {
if (v == null || v.isEmpty) {
return 'Required field'.tr;
}
if (v.length < 2) {
return 'Name must be at least 2 characters'.tr;
}
return null;
},
),
const SizedBox(height: 16),
TextFormField(
controller: c.lastNameController,
decoration: InputDecoration(
labelText: 'Last Name'.tr,
border: const OutlineInputBorder()),
validator: (v) =>
(v?.isEmpty ?? true) ? 'Required field'.tr : null,
labelText: 'Last Name'.tr,
border: const OutlineInputBorder(),
),
validator: (v) {
if (v == null || v.isEmpty) {
return 'Required field'.tr;
}
if (v.length < 2) {
return 'Name must be at least 2 characters'.tr;
}
return null;
},
),
const SizedBox(height: 16),
TextFormField(
controller: c.nationalIdController,
decoration: InputDecoration(
labelText: 'National ID Number'.tr,
border: const OutlineInputBorder()),
labelText: 'National ID Number'.tr,
border: const OutlineInputBorder(),
),
keyboardType: TextInputType.number,
validator: (v) =>
(v?.isEmpty ?? true) ? 'Required field'.tr : null,
validator: (v) {
if (v == null || v.isEmpty) {
return 'Required field'.tr;
}
if (v.length != 11) {
return 'National ID must be 11 digits'.tr;
}
return null;
},
),
const SizedBox(height: 16),
TextFormField(
@@ -296,6 +320,15 @@ class RegistrationView extends StatelessWidget {
);
}
Widget signedImageWithAuth(String fileUrl, String bearerToken) {
return Image.network(
fileUrl,
headers: {'Authorization': 'Bearer $bearerToken'},
fit: BoxFit.cover,
errorBuilder: (_, __, ___) => const Text('Image expired or unauthorized'),
);
}
Widget _buildImagePickerBox(String title, File? img, VoidCallback onTap) {
return Card(
margin: const EdgeInsets.only(bottom: 16),