6/25/1
This commit is contained in:
@@ -55,8 +55,8 @@ android {
|
|||||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdkVersion 23
|
minSdkVersion 23
|
||||||
targetSdkVersion flutter.targetSdkVersion
|
targetSdkVersion flutter.targetSdkVersion
|
||||||
versionCode 35
|
versionCode 37
|
||||||
versionName '1.5.35'
|
versionName '1.5.37'
|
||||||
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
|
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 MiB After Width: | Height: | Size: 23 MiB |
@@ -63,6 +63,7 @@ class BoxName {
|
|||||||
static const String transactionCloude = 'transactionCloude';
|
static const String transactionCloude = 'transactionCloude';
|
||||||
static const String visionApi = 'visionApi';
|
static const String visionApi = 'visionApi';
|
||||||
static const String vin = "vin";
|
static const String vin = "vin";
|
||||||
|
static const String isvibrate = "isvibrate";
|
||||||
static const String make = "make";
|
static const String make = "make";
|
||||||
static const String model = "model";
|
static const String model = "model";
|
||||||
static const String year = "year";
|
static const String year = "year";
|
||||||
|
|||||||
@@ -2,11 +2,15 @@ import 'package:flutter/material.dart';
|
|||||||
|
|
||||||
class AppColor {
|
class AppColor {
|
||||||
static const Color primaryColor = Color(0xFF1DA1F2);
|
static const Color primaryColor = Color(0xFF1DA1F2);
|
||||||
static const Color writeColor = Color(0xFF333333);
|
static const Color writeColor = Color(0xff222359);
|
||||||
|
|
||||||
|
static const Color bronze = Color(0xFFCD7F32);
|
||||||
|
static const Color goldenBronze = Color(0xFFB87333); // Golden bronze color
|
||||||
|
static const Color gold = Color(0xFFD4AF37);
|
||||||
static const Color secondaryColor = Colors.white;
|
static const Color secondaryColor = Colors.white;
|
||||||
static const Color accentColor = Colors.grey;
|
static const Color accentColor = Colors.grey;
|
||||||
static const Color twitterColor = Color(0xFF1DA1F2); // Twitter blue
|
static const Color twitterColor = Color(0xFF1DA1F2); // Twitter blue
|
||||||
|
static const Color greyColor = Colors.grey;
|
||||||
static const Color redColor = Color(0xFFEA4335); // Google Red
|
static const Color redColor = Color(0xFFEA4335); // Google Red
|
||||||
static const Color greenColor = Color(0xFF34A853); // Google Green
|
static const Color greenColor = Color(0xFF34A853); // Google Green
|
||||||
static const Color blueColor = Color(0xFF1DA1F2); // Google Blue
|
static const Color blueColor = Color(0xFF1DA1F2); // Google Blue
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
|||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
|
|
||||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||||
import 'package:SEFER/views/auth/register_page.dart';
|
|
||||||
import 'package:SEFER/views/auth/sms_verfy_page.dart';
|
import 'package:SEFER/views/auth/sms_verfy_page.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||||
@@ -84,6 +83,7 @@ class LoginController extends GetxController {
|
|||||||
'token': box.read(BoxName.tokenFCM),
|
'token': box.read(BoxName.tokenFCM),
|
||||||
'passengerID': box.read(BoxName.passengerID).toString()
|
'passengerID': box.read(BoxName.passengerID).toString()
|
||||||
});
|
});
|
||||||
|
Get.offAll(() => const MapPagePassenger());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -840,7 +840,8 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getDialog(String title, midTitle, VoidCallback onPressed) {
|
void getDialog(String title, String? midTitle, VoidCallback onPressed) {
|
||||||
|
final textToSpeechController = Get.find<TextToSpeechController>();
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: title,
|
title: title,
|
||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
@@ -849,13 +850,11 @@ class MapPassengerController extends GetxController {
|
|||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
final textToSpeechController =
|
await textToSpeechController.speakText(title ?? midTitle!);
|
||||||
Get.find<TextToSpeechController>();
|
|
||||||
await textToSpeechController.speakText(midTitle);
|
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.headphones)),
|
icon: const Icon(Icons.headphones)),
|
||||||
Text(
|
Text(
|
||||||
midTitle,
|
midTitle!,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@@ -867,6 +866,7 @@ class MapPassengerController extends GetxController {
|
|||||||
),
|
),
|
||||||
cancel: MyElevatedButton(
|
cancel: MyElevatedButton(
|
||||||
title: 'Cancel',
|
title: 'Cancel',
|
||||||
|
kolor: AppColor.redColor,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.back();
|
Get.back();
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ class MyTranslation extends Translations {
|
|||||||
@override
|
@override
|
||||||
Map<String, Map<String, String>> get keys => {
|
Map<String, Map<String, String>> get keys => {
|
||||||
"ar": {
|
"ar": {
|
||||||
|
"Click here point": "انقر هنا", // Click here (literal translation)
|
||||||
|
"Pick or Tap to confirm":
|
||||||
|
"اختر أو اضغط للتأكيد", // Choose or Tap to confirm
|
||||||
|
"Are you want to change": "هل تريد التغيير؟",
|
||||||
|
'by': 'ب',
|
||||||
"Enter your complaint here": "أدخل شكواك هنا",
|
"Enter your complaint here": "أدخل شكواك هنا",
|
||||||
"Complaint": "شكوى",
|
"Complaint": "شكوى",
|
||||||
"Please enter your complaint.": "الرجاء إدخال شكواك.",
|
"Please enter your complaint.": "الرجاء إدخال شكواك.",
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future addSeferWallet(String paymentMethod, point) async {
|
Future addSeferWallet(String paymentMethod, point) async {
|
||||||
var seferToken = await generateTokenDriver(point);
|
var seferToken = await generateTokenPassenger(point);
|
||||||
await CRUD().post(link: AppLink.addSeferWallet, payload: {
|
await CRUD().post(link: AppLink.addSeferWallet, payload: {
|
||||||
'amount': point.toString(),
|
'amount': point.toString(),
|
||||||
'paymentMethod': paymentMethod,
|
'paymentMethod': paymentMethod,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class SplashScreen extends StatelessWidget {
|
|||||||
TypewriterAnimatedText(
|
TypewriterAnimatedText(
|
||||||
'Welcome to ${AppInformation.appName}',
|
'Welcome to ${AppInformation.appName}',
|
||||||
textStyle:
|
textStyle:
|
||||||
AppStyle.headTitle2.copyWith(color: AppColor.greenColor),
|
AppStyle.headTitle2.copyWith(color: AppColor.writeColor),
|
||||||
speed: const Duration(milliseconds: 200),
|
speed: const Duration(milliseconds: 200),
|
||||||
),
|
),
|
||||||
], isRepeatingAnimation: true),
|
], isRepeatingAnimation: true),
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import '../../controller/auth/google_sign.dart';
|
|||||||
import '../../controller/auth/login_controller.dart';
|
import '../../controller/auth/login_controller.dart';
|
||||||
import '../../controller/firebase/firbase_messge.dart';
|
import '../../controller/firebase/firbase_messge.dart';
|
||||||
import '../../controller/functions/crud.dart';
|
import '../../controller/functions/crud.dart';
|
||||||
|
import '../../controller/functions/toast.dart';
|
||||||
import '../home/profile/passenger_profile_page.dart';
|
import '../home/profile/passenger_profile_page.dart';
|
||||||
import '../widgets/mycircular.dart';
|
import '../widgets/mycircular.dart';
|
||||||
import 'register_page.dart';
|
import 'register_page.dart';
|
||||||
@@ -52,143 +53,6 @@ class LoginPage extends StatelessWidget {
|
|||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// Padding(
|
|
||||||
// padding: const EdgeInsets.all(25),
|
|
||||||
// child: Container(
|
|
||||||
// decoration: const BoxDecoration(
|
|
||||||
// boxShadow: [
|
|
||||||
// BoxShadow(
|
|
||||||
// offset: Offset(3, 3),
|
|
||||||
// color: AppColor.accentColor,
|
|
||||||
// blurRadius: 3)
|
|
||||||
// ],
|
|
||||||
// color: AppColor.secondaryColor,
|
|
||||||
// ),
|
|
||||||
// child: Form(
|
|
||||||
// key: controller.formKey,
|
|
||||||
// child: Padding(
|
|
||||||
// padding: const EdgeInsets.all(16.0),
|
|
||||||
// child: SingleChildScrollView(
|
|
||||||
// child: Column(
|
|
||||||
// children: [
|
|
||||||
// TextFormField(
|
|
||||||
// keyboardType: TextInputType.emailAddress,
|
|
||||||
// controller: controller.emailController,
|
|
||||||
// decoration: InputDecoration(
|
|
||||||
// focusedBorder: OutlineInputBorder(
|
|
||||||
// borderSide: const BorderSide(
|
|
||||||
// color: AppColor.primaryColor,
|
|
||||||
// width: 2.0,
|
|
||||||
// ),
|
|
||||||
// borderRadius: BorderRadius.circular(10),
|
|
||||||
// ),
|
|
||||||
// fillColor: AppColor.accentColor,
|
|
||||||
// hoverColor: AppColor.accentColor,
|
|
||||||
// focusColor: AppColor.accentColor,
|
|
||||||
// border: const OutlineInputBorder(
|
|
||||||
// borderRadius: BorderRadius.all(
|
|
||||||
// Radius.circular(12))),
|
|
||||||
// labelText: 'Email'.tr,
|
|
||||||
// hintText: 'Enter your email address'.tr,
|
|
||||||
// ),
|
|
||||||
// validator: (value) {
|
|
||||||
// if (value!.isEmpty ||
|
|
||||||
// (!value.contains('@') ||
|
|
||||||
// !value.contains('.'))) {
|
|
||||||
// return 'Please enter Your Email.'.tr;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// const SizedBox(
|
|
||||||
// height: 30,
|
|
||||||
// ),
|
|
||||||
// TextFormField(
|
|
||||||
// keyboardType: TextInputType.phone,
|
|
||||||
// cursorColor: AppColor.accentColor,
|
|
||||||
// controller: controller.phoneController,
|
|
||||||
// decoration: InputDecoration(
|
|
||||||
// focusedBorder: OutlineInputBorder(
|
|
||||||
// borderSide: const BorderSide(
|
|
||||||
// color: AppColor.primaryColor,
|
|
||||||
// width: 2.0,
|
|
||||||
// ),
|
|
||||||
// borderRadius: BorderRadius.circular(10),
|
|
||||||
// ),
|
|
||||||
// focusColor: AppColor.accentColor,
|
|
||||||
// fillColor: AppColor.accentColor,
|
|
||||||
// border: const OutlineInputBorder(
|
|
||||||
// borderRadius: BorderRadius.all(
|
|
||||||
// Radius.circular(12))),
|
|
||||||
// labelText: 'Phone'.tr,
|
|
||||||
// hintText: 'Enter your phone number'.tr,
|
|
||||||
// ),
|
|
||||||
// validator: (value) {
|
|
||||||
// if (value!.isEmpty ||
|
|
||||||
// value.length != 10) {
|
|
||||||
// return 'Please enter your phone number.'
|
|
||||||
// .tr;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// const SizedBox(
|
|
||||||
// height: 15,
|
|
||||||
// ),
|
|
||||||
// TextFormField(
|
|
||||||
// obscureText: true,
|
|
||||||
// keyboardType: TextInputType.emailAddress,
|
|
||||||
// controller: controller.passwordController,
|
|
||||||
// decoration: InputDecoration(
|
|
||||||
// focusedBorder: OutlineInputBorder(
|
|
||||||
// borderSide: const BorderSide(
|
|
||||||
// color: AppColor.primaryColor,
|
|
||||||
// width: 2.0,
|
|
||||||
// ),
|
|
||||||
// borderRadius: BorderRadius.circular(10),
|
|
||||||
// ),
|
|
||||||
// fillColor: AppColor.accentColor,
|
|
||||||
// hoverColor: AppColor.accentColor,
|
|
||||||
// focusColor: AppColor.accentColor,
|
|
||||||
// border: const OutlineInputBorder(
|
|
||||||
// borderRadius: BorderRadius.all(
|
|
||||||
// Radius.circular(12))),
|
|
||||||
// labelText: 'Password'.tr,
|
|
||||||
// hintText:
|
|
||||||
// 'Please enter your phone number.'.tr,
|
|
||||||
// ),
|
|
||||||
// validator: (value) {
|
|
||||||
// if (value!.isEmpty) {
|
|
||||||
// return 'Please enter Your Password.'.tr;
|
|
||||||
// }
|
|
||||||
// if (value.length < 6) {
|
|
||||||
// return 'Password must br at least 6 character.'
|
|
||||||
// .tr;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// },
|
|
||||||
// ),
|
|
||||||
// GetBuilder<LoginController>(
|
|
||||||
// builder: (controller) => controller
|
|
||||||
// .isloading
|
|
||||||
// ? const MyCircularProgressIndicator()
|
|
||||||
// : MyElevatedButton(
|
|
||||||
// onPressed: () {
|
|
||||||
// if (controller
|
|
||||||
// .formKey.currentState!
|
|
||||||
// .validate()) {
|
|
||||||
// controller.login();
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// title: 'Submit'.tr,
|
|
||||||
// ),
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// )),
|
|
||||||
Center(
|
Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: AppStyle.boxDecoration1,
|
decoration: AppStyle.boxDecoration1,
|
||||||
@@ -224,21 +88,53 @@ class LoginPage extends StatelessWidget {
|
|||||||
kolor: AppColor.blueColor,
|
kolor: AppColor.blueColor,
|
||||||
),
|
),
|
||||||
!Platform.isAndroid
|
!Platform.isAndroid
|
||||||
? MyElevatedButton(
|
? Row(
|
||||||
title: 'Sign In by Apple'.tr,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
const Icon(
|
||||||
|
Icons.apple,
|
||||||
|
size: 30,
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
width: 8), // Adjust spacing as needed
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Sign in with Apple'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
User? user =
|
try {
|
||||||
await authController.signInWithApple();
|
User? user = await authController
|
||||||
|
.signInWithApple();
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
box.write(BoxName.driverID, user.uid);
|
|
||||||
box.write(
|
box.write(
|
||||||
BoxName.emailDriver, user.email);
|
BoxName.driverID, user.uid);
|
||||||
|
box.write(BoxName.emailDriver,
|
||||||
|
user.email);
|
||||||
|
|
||||||
|
// Provide user feedback
|
||||||
await GoogleSignInHelper
|
await GoogleSignInHelper
|
||||||
.signInFromLogin();
|
.signInFromLogin();
|
||||||
// Navigate to another screen or perform other actions
|
Navigator.of(context)
|
||||||
} else {}
|
.pushReplacementNamed('/home');
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'Signed in successfully',
|
||||||
|
AppColor.greenColor);
|
||||||
|
} else {
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'Sign in failed. Please try again.',
|
||||||
|
AppColor.yellowColor);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
print('Sign in error: $error');
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'An error occurred. Please check your connection and try again.',
|
||||||
|
AppColor.redColor);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
kolor: AppColor.primaryColor,
|
kolor: Colors.black,
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
],
|
],
|
||||||
@@ -392,7 +288,7 @@ class LoginPage extends StatelessWidget {
|
|||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'Grant Location'.tr,
|
title: 'Next'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await controller.getLocationPermission();
|
await controller.getLocationPermission();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,12 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
|
||||||
import 'package:SEFER/constant/info.dart';
|
|
||||||
import 'package:SEFER/controller/payment/payment_controller.dart';
|
import 'package:SEFER/controller/payment/payment_controller.dart';
|
||||||
import 'package:SEFER/main.dart';
|
|
||||||
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
|
||||||
import '../../../constant/style.dart';
|
import '../../../constant/style.dart';
|
||||||
import '../../../controller/home/map_passenger_controller.dart';
|
import '../../../controller/home/map_passenger_controller.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -582,7 +582,9 @@ class HeaderDestination extends StatelessWidget {
|
|||||||
right: 5,
|
right: 5,
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: AppStyle.boxDecoration1,
|
decoration: AppStyle.boxDecoration1,
|
||||||
height: Get.height * .2,
|
height: box.read(BoxName.countryCode) == 'Egypt'
|
||||||
|
? Get.height * .2
|
||||||
|
: Get.height * .14,
|
||||||
width: Get.width * .8,
|
width: Get.width * .8,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -598,27 +600,49 @@ class HeaderDestination extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: Get.height * .12,
|
height: box.read(BoxName.countryCode) == 'Egypt'
|
||||||
|
? Get.height * .14
|
||||||
|
: Get.height * .06,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
//
|
//
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'🟢 ${mapPassengerController.startNameAddress}',
|
'🟢 ',
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'🔴 ${mapPassengerController.endNameAddress}',
|
mapPassengerController.startNameAddress,
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'🔴 ',
|
||||||
|
style: AppStyle.subtitle,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
mapPassengerController.endNameAddress,
|
||||||
|
style: AppStyle.subtitle,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'📍 ${mapPassengerController.distance} ${'KM'.tr} ⌛ ${mapPassengerController.hours > 0 ? '${'Your Ride Duration is '.tr}${mapPassengerController.hours} ${'H and'.tr} ${mapPassengerController.minutes} ${'m'.tr}' : '${'Your Ride Duration is '.tr} ${mapPassengerController.minutes} m'}',
|
'📍 ${mapPassengerController.distance} ${'KM'.tr} ⌛ ${mapPassengerController.hours > 0 ? '${'Your Ride Duration is '.tr}${mapPassengerController.hours} ${'H and'.tr} ${mapPassengerController.minutes} ${'m'.tr}' : '${'Your Ride Duration is '.tr} ${mapPassengerController.minutes} ${'m'.tr}'}',
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -102,26 +102,26 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
// ),
|
// ),
|
||||||
AnimatedContainer(
|
// AnimatedContainer(
|
||||||
duration: const Duration(microseconds: 200),
|
// duration: const Duration(microseconds: 200),
|
||||||
width: controller.widthMapTypeAndTraffic,
|
// width: controller.widthMapTypeAndTraffic,
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: AppColor.secondaryColor,
|
// color: AppColor.secondaryColor,
|
||||||
border: Border.all(),
|
// border: Border.all(),
|
||||||
borderRadius: BorderRadius.circular(15)),
|
// borderRadius: BorderRadius.circular(15)),
|
||||||
child: IconButton(
|
// child: IconButton(
|
||||||
onPressed: () async {
|
// onPressed: () async {
|
||||||
var phone = box.read(BoxName.countryCode) == 'Egypt'
|
// var phone = box.read(BoxName.countryCode) == 'Egypt'
|
||||||
? '+2${box.read(BoxName.sosPhonePassenger)}'
|
// ? '+2${box.read(BoxName.sosPhonePassenger)}'
|
||||||
: '+962${box.read(BoxName.sosPhonePassenger)}';
|
// : '+962${box.read(BoxName.sosPhonePassenger)}';
|
||||||
controller.sendWhatsapp(phone);
|
// controller.sendWhatsapp(phone);
|
||||||
},
|
// },
|
||||||
icon: const Icon(
|
// icon: const Icon(
|
||||||
Icons.chat,
|
// Icons.chat,
|
||||||
size: 29,
|
// size: 29,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
// AnimatedContainer(
|
// AnimatedContainer(
|
||||||
// duration: const Duration(microseconds: 200),
|
// duration: const Duration(microseconds: 200),
|
||||||
// width: controller.widthMapTypeAndTraffic,
|
// width: controller.widthMapTypeAndTraffic,
|
||||||
|
|||||||
@@ -25,12 +25,6 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
left: 5,
|
left: 5,
|
||||||
right: 5,
|
right: 5,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
onVerticalDragUpdate: (DragUpdateDetails details) {
|
|
||||||
// Update the size of the GestureDetector based on the user's finger position.
|
|
||||||
|
|
||||||
// _height = details.globalPosition.dy;
|
|
||||||
controller.changeMainBottomMenuMap();
|
|
||||||
},
|
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 500),
|
duration: const Duration(milliseconds: 500),
|
||||||
height: controller.mainBottomMenuMapHeight,
|
height: controller.mainBottomMenuMapHeight,
|
||||||
|
|||||||
@@ -175,8 +175,8 @@ class MapMenuWidget extends StatelessWidget {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await canLaunch(driverAppUrl)) {
|
if (await canLaunchUrl(Uri.parse(driverAppUrl))) {
|
||||||
await launch(driverAppUrl);
|
await launchUrl(Uri.parse(driverAppUrl));
|
||||||
} else {
|
} else {
|
||||||
throw 'Could not launch app store URL';
|
throw 'Could not launch app store URL';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,16 +35,26 @@ class PointsCaptain extends StatelessWidget {
|
|||||||
height: Get.width * .29,
|
height: Get.width * .29,
|
||||||
margin: const EdgeInsets.all(4),
|
margin: const EdgeInsets.all(4),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kolor,
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
kolor.withOpacity(0.3),
|
||||||
|
kolor,
|
||||||
|
kolor.withOpacity(0.7),
|
||||||
|
kolor,
|
||||||
|
],
|
||||||
|
begin: Alignment.topLeft,
|
||||||
|
end: Alignment.bottomRight,
|
||||||
|
),
|
||||||
border: Border.all(color: AppColor.accentColor),
|
border: Border.all(color: AppColor.accentColor),
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
shape: BoxShape.rectangle,
|
shape: BoxShape.rectangle,
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'$countPoint ${'Point'.tr}',
|
'$countPoint ${'LE'.tr}',
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ class PromosPassengerPage extends StatelessWidget {
|
|||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
children: [
|
children: [
|
||||||
PointsCaptain(
|
PointsCaptain(
|
||||||
kolor: AppColor.blueColor,
|
kolor: AppColor.greyColor,
|
||||||
pricePoint:
|
pricePoint:
|
||||||
box.read(BoxName.countryCode) ==
|
box.read(BoxName.countryCode) ==
|
||||||
'Jordan'
|
'Jordan'
|
||||||
@@ -60,7 +60,7 @@ class PromosPassengerPage extends StatelessWidget {
|
|||||||
: '100',
|
: '100',
|
||||||
),
|
),
|
||||||
PointsCaptain(
|
PointsCaptain(
|
||||||
kolor: Colors.green,
|
kolor: AppColor.bronze,
|
||||||
pricePoint:
|
pricePoint:
|
||||||
box.read(BoxName.countryCode) ==
|
box.read(BoxName.countryCode) ==
|
||||||
'Jordan'
|
'Jordan'
|
||||||
@@ -73,7 +73,7 @@ class PromosPassengerPage extends StatelessWidget {
|
|||||||
: '210',
|
: '210',
|
||||||
),
|
),
|
||||||
PointsCaptain(
|
PointsCaptain(
|
||||||
kolor: Colors.amberAccent,
|
kolor: AppColor.goldenBronze,
|
||||||
pricePoint:
|
pricePoint:
|
||||||
box.read(BoxName.countryCode) ==
|
box.read(BoxName.countryCode) ==
|
||||||
'Jordan'
|
'Jordan'
|
||||||
@@ -86,7 +86,7 @@ class PromosPassengerPage extends StatelessWidget {
|
|||||||
: '450',
|
: '450',
|
||||||
),
|
),
|
||||||
PointsCaptain(
|
PointsCaptain(
|
||||||
kolor: AppColor.yellowColor,
|
kolor: AppColor.gold,
|
||||||
pricePoint:
|
pricePoint:
|
||||||
box.read(BoxName.countryCode) ==
|
box.read(BoxName.countryCode) ==
|
||||||
'Jordan'
|
'Jordan'
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:SEFER/constant/style.dart';
|
import 'package:SEFER/constant/style.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@@ -22,18 +24,26 @@ class MyElevatedButton extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
bool vibrate = box.read(BoxName.isvibrate) ?? true;
|
||||||
return ElevatedButton(
|
return ElevatedButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
backgroundColor: MaterialStateProperty.all(kolor),
|
backgroundColor: MaterialStateProperty.all(kolor),
|
||||||
|
shape: MaterialStateProperty.all(RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12.0),
|
||||||
|
)),
|
||||||
|
// padding:
|
||||||
|
// MaterialStateProperty.all(const EdgeInsets.symmetric(vertical: 15)),
|
||||||
),
|
),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
// Handle haptic feedback for both iOS and Android
|
// Handle haptic feedback for both iOS and Android
|
||||||
|
if (vibrate) {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
HapticFeedback.selectionClick();
|
HapticFeedback.selectionClick();
|
||||||
} else {
|
} else {
|
||||||
Vibration.vibrate(duration: 100);
|
Vibration.vibrate(duration: 100);
|
||||||
// Vibrate.vibrateWithPauses(pauses);
|
// Vibrate.vibrateWithPauses(pauses);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure the onPressed callback is called after haptic feedback
|
// Ensure the onPressed callback is called after haptic feedback
|
||||||
onPressed();
|
onPressed();
|
||||||
|
|||||||
Reference in New Issue
Block a user