Update: 2026-06-13 15:43:50

This commit is contained in:
Hamza-Ayed
2026-06-13 15:43:50 +03:00
parent bfc530b013
commit 55970712cc
43 changed files with 891 additions and 544 deletions

View File

@@ -5,6 +5,25 @@
"storage_bucket": "siro-a6957.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:825988584191:android:caa30eaac3524de51632ca",
"android_client_info": {
"package_name": "com.siro.admin"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEoply_UcEP6KaCu_ziCy_ZDIjAKvi7b8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:825988584191:android:4525a21b00173d361632ca",
@@ -42,6 +61,63 @@
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:825988584191:android:be08180beef7d65e1632ca",
"android_client_info": {
"package_name": "com.siro.service"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEoply_UcEP6KaCu_ziCy_ZDIjAKvi7b8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:825988584191:android:492d9bc1df6b40c51632ca",
"android_client_info": {
"package_name": "com.siro.siro_driver"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEoply_UcEP6KaCu_ziCy_ZDIjAKvi7b8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:825988584191:android:7e9088b719dcb7061632ca",
"android_client_info": {
"package_name": "com.siro.siro_rider"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyAEoply_UcEP6KaCu_ziCy_ZDIjAKvi7b8"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": []
}
}
}
],
"configuration_version": "1"

View File

@@ -31,6 +31,22 @@
<uses-permission android:name="android.permission.PICTURE_IN_PICTURE" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<!-- Package visibility declarations for external apps like maps and WhatsApp -->
<queries>
<package android:name="com.whatsapp" />
<package android:name="com.google.android.apps.maps" />
<intent>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="geo" />
</intent>
</queries>
<application android:name="${applicationName}" android:icon="@mipmap/launcher_icon"
android:label="@string/label" android:enableOnBackInvokedCallback="true"
android:allowBackup="false" android:fullBackupContent="false"

View File

@@ -1 +1 @@
{"flutter":{"platforms":{"android":{"default":{"projectId":"siro-a6957","appId":"1:825988584191:android:4525a21b00173d361632ca","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"siro-a6957","appId":"1:825988584191:ios:4002b88e618f0c4e1632ca","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"siro-a6957","configurations":{"android":"1:825988584191:android:4525a21b00173d361632ca","ios":"1:825988584191:ios:4002b88e618f0c4e1632ca"}}}}}}
{"flutter":{"platforms":{"android":{"default":{"projectId":"siro-a6957","appId":"1:825988584191:android:492d9bc1df6b40c51632ca","fileOutput":"android/app/google-services.json"}},"ios":{"default":{"projectId":"siro-a6957","appId":"1:825988584191:ios:a86f1a54f0b1aaa21632ca","uploadDebugSymbols":false,"fileOutput":"ios/Runner/GoogleService-Info.plist"}},"dart":{"lib/firebase_options.dart":{"projectId":"siro-a6957","configurations":{"android":"1:825988584191:android:492d9bc1df6b40c51632ca","ios":"1:825988584191:ios:a86f1a54f0b1aaa21632ca"}}}}}}

View File

@@ -9,7 +9,7 @@
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.siro.driver</string>
<string>com.siro.siro-driver</string>
<key>PROJECT_ID</key>
<string>siro-a6957</string>
<key>STORAGE_BUCKET</key>
@@ -25,6 +25,6 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:825988584191:ios:4002b88e618f0c4e1632ca</string>
<string>1:825988584191:ios:a86f1a54f0b1aaa21632ca</string>
</dict>
</plist>

View File

@@ -57,6 +57,7 @@
<array>
<string>googlechromes</string>
<string>comgooglemaps</string>
<string>whatsapp</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>12.0</string>

View File

@@ -17,6 +17,13 @@ class AppLink {
static const String appDomain = 'siromove.com';
static String get inviteRedirectUrl {
if (currentCountry == 'Syria') {
return "https://siromove.com/inviteSyria.php";
}
return "https://siromove.com/invite.php";
}
static String get location {
switch (currentCountry) {
case 'Syria': return 'https://api-syria.siromove.com/siro_v3/ride/location';

View File

@@ -45,7 +45,8 @@ class InviteController extends GetxController {
final String shareText =
'''Join Siro as a driver using my referral code!
Use code: $driverCouponCode
Download the Siro Driver app now and earn rewards!
Download the Siro Driver app now and earn rewards:
https://siromove.com/invite.php?code=$driverCouponCode&app=driver
''';
await Share.share(shareText);
}
@@ -55,7 +56,8 @@ Download the Siro Driver app now and earn rewards!
if (couponCode != null) {
final String shareText = '''Get a discount on your first Siro ride!
Use my referral code: $couponCode
Download the Siro app now and enjoy your ride!
Download the Siro app now and enjoy your ride:
https://siromove.com/invite.php?code=$couponCode&app=rider
''';
await Share.share(shareText);
}
@@ -491,15 +493,15 @@ Download the Siro app now and enjoy your ride!
if (response != 'failure') {
var d = (response);
mySnackbarSuccess('Invite sent successfully'.tr);
String inviteCode = d['message']['inviteCode'].toString();
String message = '${'*Siro DRIVER CODE*'.tr}\n\n'
'${"Use this code in registration".tr}\n'
'${"To get a gift for both".tr}\n\n'
'${"The period of this code is 24 hours".tr}\n\n'
'${'before'.tr} *${d['message']['expirationTime'].toString()}*\n\n'
'_*${d['message']['inviteCode'].toString()}*_\n\n'
'${"Install our app:".tr}\n'
'*Android:* https://play.google.com/store/apps/details?id=com.siro_driver \n\n\n'
'*iOS:* https://apps.apple.com/st/app/siro-driver/id6482995159';
'_*${inviteCode}*_\n\n'
'${"Quick Invite Link:".tr}\n'
'${AppLink.inviteRedirectUrl}?code=$inviteCode&app=driver';
launchCommunication('whatsapp', formattedPhoneNumber, message);
invitePhoneController.clear();
@@ -534,18 +536,16 @@ Download the Siro app now and enjoy your ride!
if (response != 'failure') {
var d = response;
mySnackbarSuccess('Invite sent successfully'.tr);
String inviteCode = d['message']['inviteCode'].toString();
String message = '${'*Siro APP CODE*'.tr}\n\n'
'${"Use this code in registration".tr}\n\n'
'${"To get a gift for both".tr}\n\n'
'${"The period of this code is 24 hours".tr}\n\n'
'${'before'.tr} *${d['message']['expirationTime'].toString()}*\n\n'
'_*${d['message']['inviteCode'].toString()}*_\n\n'
'_*${inviteCode}*_\n\n'
'${"Quick Invite Link:".tr}\n'
'https://${AppLink.appDomain}/?inviteCode=${d['message']['inviteCode'].toString()}\n\n'
'${"Install our app:".tr}\n'
'*Android:* https://play.google.com/store/apps/details?id=com.Siro.siro\n\n\n'
'*iOS:* https://apps.apple.com/st/app/siro-rider/id6748075179';
'${AppLink.inviteRedirectUrl}?code=$inviteCode&app=rider';
launchCommunication('whatsapp', formattedPhoneNumber, message);
invitePhoneController.clear();

View File

@@ -51,17 +51,17 @@ class DefaultFirebaseOptions {
static const FirebaseOptions android = FirebaseOptions(
apiKey: 'AIzaSyAEoply_UcEP6KaCu_ziCy_ZDIjAKvi7b8',
appId: '1:825988584191:android:4525a21b00173d361632ca',
appId: '1:825988584191:android:492d9bc1df6b40c51632ca',
messagingSenderId: '825988584191',
projectId: 'siro-a6957',
storageBucket: 'siro-a6957.firebasestorage.app',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: 'AIzaSyDk6x6KZUY0IQtxoCMXX0F7N_yik8O19eA',
appId: '1:825988584191:ios:4002b88e618f0c4e1632ca',
appId: '1:825988584191:ios:a86f1a54f0b1aaa21632ca',
messagingSenderId: '825988584191',
projectId: 'siro-a6957',
storageBucket: 'siro-a6957.firebasestorage.app',
iosBundleId: 'com.siro.driver',
iosBundleId: 'com.siro.siro-driver',
);
}

View File

@@ -1,6 +1,5 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:qr_flutter/qr_flutter.dart';
import 'package:siro_driver/views/widgets/error_snakbar.dart';
import 'package:siro_driver/views/widgets/my_textField.dart';
import 'package:siro_driver/views/widgets/elevated_btn.dart'; // Checked import
@@ -40,29 +39,13 @@ class SosConnect extends StatelessWidget {
),
],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
// === SOS Button ===
_buildModernActionButton(
icon: MaterialIcons.warning,
color: Colors.white,
bgColor: AppColor.redColor,
tooltip: 'EMERGENCY SOS',
isPulsing: true,
onTap: () => _handleSosCall(controller),
),
const SizedBox(height: 8),
// === Quick Invite Button ===
_buildModernActionButton(
icon: Icons.qr_code_rounded,
color: Colors.white,
bgColor: AppColor.blueColor,
tooltip: 'Quick Invite',
isPulsing: false,
onTap: () => _showQuickInviteDialog(controller),
),
],
child: _buildModernActionButton(
icon: MaterialIcons.warning,
color: Colors.white,
bgColor: AppColor.redColor,
tooltip: 'EMERGENCY SOS',
isPulsing: true,
onTap: () => _handleSosCall(controller),
),
);
},
@@ -140,70 +123,4 @@ class SosConnect extends StatelessWidget {
launchCommunication('phone', box.read(BoxName.sosPhoneDriver), '');
}
}
void _showQuickInviteDialog(MapDriverController controller) {
// In a real scenario, this code would be fetched from the backend (ReferralController)
// For now we will use a generated code or driverId. We should use the one from ReferralController
// But since we are accessing it globally, we can just use the driverID + 123 for now until it's linked
String driverId = box.read(BoxName.driverID).toString();
String inviteCode = "SR$driverId"; // Placeholder code
String deepLink = "https://${AppLink.appDomain}/invite?ref=$inviteCode";
Get.defaultDialog(
title: "Quick Invite".tr,
titleStyle: AppStyle.title.copyWith(fontWeight: FontWeight.bold),
content: Column(
children: [
Text(
"Let the passenger scan this code to sign up".tr,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 14, color: Colors.grey),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.all(16),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.05),
blurRadius: 10,
offset: const Offset(0, 4),
),
],
),
child: QrImageView(
data: deepLink,
version: QrVersions.auto,
size: 200.0,
backgroundColor: Colors.white,
),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
decoration: BoxDecoration(
color: AppColor.blueColor.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: AppColor.blueColor.withOpacity(0.3)),
),
child: Text(
inviteCode,
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w900,
color: AppColor.blueColor,
letterSpacing: 4,
),
),
),
],
),
confirm: MyElevatedButton(
title: 'Done'.tr,
onPressed: () => Get.back(),
),
);
}
}

View File

@@ -1732,22 +1732,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.5.0"
qr:
dependency: transitive
description:
name: qr
sha256: "5a1d2586170e172b8a8c8470bbbffd5eb0cd38a66c0d77155ea138d3af3a4445"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
qr_flutter:
dependency: "direct main"
description:
name: qr_flutter
sha256: "5095f0fc6e3f71d08adef8feccc8cea4f12eec18a2e31c2e8d82cb6019f4b097"
url: "https://pub.dev"
source: hosted
version: "4.1.0"
quick_actions:
dependency: "direct main"
description:

View File

@@ -41,7 +41,6 @@ dependencies:
lottie: ^3.3.1
shimmer: ^3.0.0
slide_to_act: ^2.0.2
qr_flutter: ^4.1.0
# Services & Hardware
battery_plus: ^7.0.0