Update codebase

This commit is contained in:
Hamza-Ayed
2026-08-09 16:56:13 +03:00
parent 95e2e4f35d
commit b64debaa88
1058 changed files with 164327 additions and 113928 deletions
@@ -1,7 +1,7 @@
// import 'package:camera/camera.dart';
// import 'package:flutter/material.dart';
// import 'package:get/get.dart';
// import 'package:tripz_driver/views/widgets/elevated_btn.dart';
// import 'package:siro_driver/views/widgets/elevated_btn.dart';
// import '../../../../constant/colors.dart';
// import '../../../../constant/style.dart';
@@ -1,100 +1,92 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_font_icons/flutter_font_icons.dart';
import 'package:get/get.dart';
import '../../../constant/colors.dart';
import '../../../constant/style.dart';
import '../../../controller/functions/tts.dart';
import '../../../controller/home/captin/contact_us_controller.dart';
import '../../widgets/my_scafold.dart';
import '../../widgets/ui/siro_ui.dart';
class ContactUsPage extends StatelessWidget {
ContactUsPage({super.key});
const ContactUsPage({super.key});
static const String _aboutText =
'Siro 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.';
@override
Widget build(BuildContext context) {
Get.put(ContactUsController());
return GetBuilder<ContactUsController>(builder: (controller) {
return MyScafolld(
title: "Contact Us".tr,
body: [
Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
return SiroPage(
title: 'Contact Us'.tr,
padding: SiroUi.pageInsets,
body: ListView(
children: [
SiroCard(
padding: const EdgeInsets.fromLTRB(16, 16, 16, 8),
child: Column(
children: [
Container(
decoration: AppStyle.boxDecoration1,
child: Column(
children: [
ClipRRect(
borderRadius: BorderRadius.circular(15),
child: Image.asset('assets/images/logo.gif')),
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.'
.tr);
},
icon: const Icon(Icons.headphones),
),
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.'
.tr,
style: AppStyle.title,
textAlign: TextAlign.center,
),
),
],
ClipRRect(
borderRadius: BorderRadius.circular(14),
child: Image.asset(
'assets/images/logo.gif',
height: 150,
fit: BoxFit.contain,
),
),
const SizedBox(
height: 30,
const SizedBox(height: 12),
Text(
_aboutText.tr,
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.center,
),
Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
"You can contact us during working hours from 10:00 - 17:00."
.tr,
style: AppStyle.title,
textAlign: TextAlign.center,
),
),
const SizedBox(height: 4),
// زرّ القراءة الصوتية كان أيقونة عارية بلا تسمية،
// فلا يُفهم غرضه قبل الضغط.
TextButton.icon(
onPressed: () => Get.put(TextToSpeechController())
.speakText(_aboutText.tr),
icon: const Icon(Icons.headphones_rounded, size: 18),
label: Text('Listen'.tr),
),
InkWell(
onTap: () => controller.showContactDialog(context),
child: const Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Icon(
Icons.phone,
color: AppColor.blueColor,
),
Icon(
FontAwesome.whatsapp,
color: AppColor.greenColor,
),
Icon(
Icons.email,
color: AppColor.redColor,
),
],
),
),
const SizedBox(
height: 30,
)
],
),
)
),
SiroCard(
child: Row(
children: [
SiroIconBadge(Icons.schedule_rounded,
color: SiroUi.interactive(context)),
const SizedBox(width: 12),
Expanded(
child: Text(
'You can contact us during working hours from 10:00 - 17:00.'
.tr,
style: Theme.of(context).textTheme.bodyMedium,
),
),
],
),
),
SiroSectionTitle('Contact Us'.tr),
SiroCard(
padding: const EdgeInsets.symmetric(vertical: 18),
onTap: () => controller.showContactDialog(context),
child: const Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SiroIconBadge(Icons.phone_rounded,
color: AppColor.primaryColor, size: 24),
SiroIconBadge(FontAwesome.whatsapp,
color: AppColor.greenColor, size: 24),
SiroIconBadge(Icons.email_rounded,
color: AppColor.redColor, size: 24),
],
),
),
],
isleading: true);
),
);
});
}
}
@@ -226,10 +226,10 @@ class InviteScreen extends StatelessWidget {
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 8),
borderRadius: BorderRadius.circular(8),
onPressed: () {
final appName = 'Tripz';
final appName = 'Siro';
final isDriver = controller.selectedTab == 0;
final shareText = isDriver
? 'Join $appName as a driver! Use my referral code: ${rc.referralCode}\nDownload: ${AppLink.inviteRedirectUrl}?code=${rc.referralCode}&app=driver\n\n💡 Note: If the link is not clickable, save this number or reply to activate links!'
? 'Join $appName as a driver! Use my referral code: ${rc.referralCode}\n${AppLink.driverDownloadLinks}\n\n💡 Note: If the link is not clickable, save this number or reply to activate links!'
: 'Get a ride with $appName! Use my referral code: ${rc.referralCode} for a discount.\nDownload: ${AppLink.inviteRedirectUrl}?code=${rc.referralCode}&app=rider\n\n💡 Note: If the link is not clickable, save this number or reply to activate links!';
Share.share(shareText);
},
@@ -347,11 +347,7 @@ class InviteScreen extends StatelessWidget {
onPressed: () async {
await controller.pickContactFromNativeApp();
if (controller.contacts.isNotEmpty) {
if (box.read(BoxName.isSavedPhones) == null) {
// controller.savePhoneToServer();
box.write(BoxName.isSavedPhones, true);
}
_showContactsDialog(Get.context!);
await _openContactsDialog(Get.context!);
}
},
),
@@ -731,6 +727,14 @@ class InviteScreen extends StatelessWidget {
}
*/
/// ‏تُحمَّل جهات الاتصال هنا عند الطلب — كانت تُقرأ وتُرفع تلقائياً عند
/// ‏فتح الشاشة. لا شيء يغادر الجهاز الآن.
Future<void> _openContactsDialog(BuildContext context) async {
await controller.loadDeviceContacts();
if (!context.mounted) return;
_showContactsDialog(context);
}
void _showContactsDialog(BuildContext context) {
showCupertinoModalPopup(
context: context,
@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tripz_driver/constant/colors.dart';
import 'package:tripz_driver/controller/functions/log_out.dart';
import 'package:tripz_driver/views/widgets/elevated_btn.dart';
import 'package:tripz_driver/views/widgets/my_scafold.dart';
import 'package:siro_driver/constant/colors.dart';
import 'package:siro_driver/controller/functions/log_out.dart';
import 'package:siro_driver/views/widgets/elevated_btn.dart';
import 'package:siro_driver/views/widgets/my_scafold.dart';
class LogoutCaptain extends StatelessWidget {
const LogoutCaptain({super.key});
@@ -2,7 +2,7 @@ import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:tripz_driver/controller/auth/captin/login_captin_controller.dart';
import 'package:siro_driver/controller/auth/captin/login_captin_controller.dart';
// --- Placeholder Imports ---
// Assuming these files exist in your project structure.
@@ -318,7 +318,7 @@ class _PhoneNumberScreenState extends State<PhoneNumberScreen> {
@override
Widget build(BuildContext context) {
return AuthScreen(
title: 'welcome to tripz'.tr,
title: 'welcome to siro'.tr,
subtitle: 'login or register subtitle'.tr,
form: Form(
key: _formKey,