This commit is contained in:
Hamza-Ayed
2024-05-27 13:21:14 +03:00
parent 3ff0eace3f
commit 6f3c8b975e
23 changed files with 213 additions and 171 deletions

View File

@@ -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 22 minSdkVersion 22
targetSdkVersion flutter.targetSdkVersion targetSdkVersion flutter.targetSdkVersion
versionCode 25 versionCode 27
versionName '1.4.8' versionName '1.4.91'
// manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml'] // manifestPlaceholders = [mapsApiKey: 'android/app/src/main/AndroidManifest.xml']
} }

BIN
assets/fonts/digit.ttf Normal file

Binary file not shown.

BIN
assets/fonts/josefin.ttf Normal file

Binary file not shown.

BIN
assets/fonts/mohanad.ttf Normal file

Binary file not shown.

View File

@@ -6,7 +6,7 @@ class BoxName {
static const String lang = "lang"; static const String lang = "lang";
static const String carType = "carType"; static const String carType = "carType";
static const String carPlate = "carPlate"; static const String carPlate = "carPlate";
static const String isVerified = 'false'; static const String isVerified = '0';
static const String statusDriverLocation = "statusDriverLocation"; static const String statusDriverLocation = "statusDriverLocation";
static const String password = "password"; static const String password = "password";
static const String arrivalTime = "arrivalTime"; static const String arrivalTime = "arrivalTime";

View File

@@ -1,7 +1,6 @@
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart'; import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'colors.dart'; import 'colors.dart';
class AppStyle { class AppStyle {
@@ -10,42 +9,42 @@ class AppStyle {
fontSize: 40, fontSize: 40,
color: AppColor.accentColor, color: AppColor.accentColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'en'
? GoogleFonts.josefinSans().fontFamily ? 'josefin'
: box.read(BoxName.lang) == 'ar' : box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily ? 'mohanad'
: GoogleFonts.josefinSans().fontFamily); : 'josefin');
static TextStyle headTitle2 = TextStyle( static TextStyle headTitle2 = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 26, fontSize: 26,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'en'
? GoogleFonts.josefinSans().fontFamily ? 'josefin'
: box.read(BoxName.lang) == 'ar' : box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily ? 'mohanad'
: GoogleFonts.josefinSans().fontFamily); : 'josefin');
static TextStyle title = TextStyle( static TextStyle title = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 16, fontSize: 14,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'en'
? GoogleFonts.josefinSans().fontFamily ? 'josefin'
: box.read(BoxName.lang) == 'ar' : box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily ? 'mohanad'
: GoogleFonts.josefinSans().fontFamily); : 'josefin');
static TextStyle subtitle = TextStyle( static TextStyle subtitle = TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 13, fontSize: 13,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: box.read(BoxName.lang) == 'en' fontFamily: box.read(BoxName.lang) == 'en'
? GoogleFonts.josefinSans().fontFamily ? 'josefin'
: box.read(BoxName.lang) == 'ar' : box.read(BoxName.lang) == 'ar'
? GoogleFonts.amiri().fontFamily ? 'mohanad'
: GoogleFonts.josefinSans().fontFamily); : 'josefin');
static TextStyle number = TextStyle( static TextStyle number = const TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 14, fontSize: 14,
color: AppColor.primaryColor, color: AppColor.primaryColor,
fontFamily: GoogleFonts.averiaSansLibre().fontFamily); fontFamily: 'digit');
static BoxDecoration boxDecoration = const BoxDecoration( static BoxDecoration boxDecoration = const BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),

View File

@@ -0,0 +1,35 @@
import 'package:firebase_auth/firebase_auth.dart';
import 'package:get/get.dart';
import 'package:sign_in_with_apple/sign_in_with_apple.dart';
class AuthController extends GetxController {
final FirebaseAuth _auth = FirebaseAuth.instance;
Future<User?> signInWithApple() async {
try {
final appleCredential = await SignInWithApple.getAppleIDCredential(
scopes: [
AppleIDAuthorizationScopes.email,
AppleIDAuthorizationScopes.fullName,
],
);
final oAuthProvider = OAuthProvider('apple.com');
final credential = oAuthProvider.credential(
idToken: appleCredential.identityToken,
accessToken: appleCredential.authorizationCode,
);
UserCredential userCredential =
await _auth.signInWithCredential(credential);
return userCredential.user;
} catch (error) {
print("Error during Apple sign-in: $error");
return null;
}
}
void signOut() async {
await _auth.signOut();
}
}

View File

@@ -66,8 +66,9 @@ class LoginController extends GetxController {
if (jsonDecoeded['status'] == 'success' && if (jsonDecoeded['status'] == 'success' &&
jsonDecoeded['data'][0]['verified'] == 1) { jsonDecoeded['data'][0]['verified'] == 1) {
// //
box.write(BoxName.isVerified, 'true'); box.write(BoxName.isVerified, '1');
box.write(BoxName.email, jsonDecoeded['data'][0]['email']); box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
print(box.read(BoxName.tokenFCM)); print(box.read(BoxName.tokenFCM));
var token = await CRUD().get(link: AppLink.getTokens, payload: { var token = await CRUD().get(link: AppLink.getTokens, payload: {
@@ -78,12 +79,14 @@ class LoginController extends GetxController {
if (token != 'failure') { if (token != 'failure') {
if (jsonDecode(token)['data'][0]['token'] != if (jsonDecode(token)['data'][0]['token'] !=
box.read(BoxName.tokenFCM)) { box.read(BoxName.tokenFCM)) {
print('token changed');
Get.put(FirebaseMessagesController()) Get.put(FirebaseMessagesController())
.sendNotificationToAnyWithoutData( .sendNotificationToAnyWithoutData(
'token change', 'token change',
'change device', 'change device',
jsonDecode(token)['data'][0]['token'].toString(), jsonDecode(token)['data'][0]['token'].toString(),
); );
Future.delayed(const Duration(seconds: 1));
await CRUD().post(link: AppLink.addTokens, payload: { await CRUD().post(link: AppLink.addTokens, payload: {
'token': box.read(BoxName.tokenFCM), 'token': box.read(BoxName.tokenFCM),
'passengerID': box.read(BoxName.passengerID).toString() 'passengerID': box.read(BoxName.passengerID).toString()

View File

@@ -116,7 +116,7 @@ class RegisterController extends GetxController {
payload: payload, payload: payload,
); );
if (jsonDecode(res1)['status'] == 'success') { if (jsonDecode(res1)['status'] == 'success') {
box.write(BoxName.isVerified, 'true'); box.write(BoxName.isVerified, '1');
box.write(BoxName.phone, '+2${phoneController.text}'); box.write(BoxName.phone, '+2${phoneController.text}');
Get.offAll(const MapPagePassenger()); Get.offAll(const MapPagePassenger());
} }

View File

@@ -94,12 +94,7 @@ class FirebaseMessagesController extends GetxController {
Future getToken() async { Future getToken() async {
fcmToken.getToken().then((token) { fcmToken.getToken().then((token) {
if (box.read(BoxName.email) == null) { box.write(BoxName.tokenFCM, token);
box.write(BoxName.tokenDriver, token);
} else {
box.write(BoxName.tokenFCM, token);
}
print(token);
}); });
FirebaseMessaging.onMessage.listen((RemoteMessage message) { FirebaseMessaging.onMessage.listen((RemoteMessage message) {

View File

@@ -13,24 +13,24 @@ void launchCommunication(
String method, String contactInfo, String message) async { String method, String contactInfo, String message) async {
String url; String url;
// Encode the message
String encodedMessage = Uri.encodeComponent(message);
if (Platform.isIOS) { if (Platform.isIOS) {
switch (method) { switch (method) {
case 'phone': case 'phone':
url = 'tel:$contactInfo'; url = 'tel:$contactInfo';
break; break;
case 'sms': case 'sms':
url = 'sms:$contactInfo?body=$message'; url = 'sms:$contactInfo?body=$encodedMessage';
break; break;
case 'whatsapp': case 'whatsapp':
url = 'https://api.whatsapp.com/send?phone=$contactInfo&text=$message'; url =
'https://api.whatsapp.com/send?phone=$contactInfo&text=$encodedMessage';
break; break;
case 'email': case 'email':
url = 'mailto:$contactInfo?subject=Subject&body=$message'; url = 'mailto:$contactInfo?subject=Subject&body=$encodedMessage';
break; break;
default: default:
print('Method not supported on iOS'); print('Method not supported on iOS');
return; return;
@@ -40,19 +40,15 @@ void launchCommunication(
case 'phone': case 'phone':
url = 'tel:$contactInfo'; url = 'tel:$contactInfo';
break; break;
case 'sms': case 'sms':
url = 'sms:$contactInfo?body=$message'; url = 'sms:$contactInfo?body=$encodedMessage';
break; break;
case 'whatsapp': case 'whatsapp':
url = 'whatsapp://send?phone=$contactInfo&text=$message'; url = 'whatsapp://send?phone=$contactInfo&text=$encodedMessage';
break; break;
case 'email': case 'email':
url = 'mailto:$contactInfo?subject=Subject&body=$message'; url = 'mailto:$contactInfo?subject=Subject&body=$encodedMessage';
break; break;
default: default:
print('Method not supported on Android'); print('Method not supported on Android');
return; return;
@@ -62,8 +58,8 @@ void launchCommunication(
return; return;
} }
if (await canLaunchUrl(Uri.parse(url))) { if (await canLaunch(url)) {
launchUrl(Uri.parse(url)); await launch(url);
} else { } else {
print('Could not launch $url'); print('Could not launch $url');
} }

View File

@@ -479,14 +479,13 @@ class MapPassengerController extends GetxController {
void sendWhatsapp(String to) async { void sendWhatsapp(String to) async {
// Get the driver's phone number. // Get the driver's phone number.
// String driverPhone = // String driverPhone = dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString();
// dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString();
// Format the message. // Format the message.
String message = String message =
'${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} $firstName${' as the driver.'.tr} $firstName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.'; '${'${'Hi! This is'.tr} ${box.read(BoxName.name)}.\n${' I am using'.tr}'} ${AppInformation.appName}${' to ride with'.tr} $firstName${' as the driver.'.tr} $firstName \n${'is driving a '.tr}$model\n${' with license plate '.tr}$licensePlate.\n${' I am currently located at '.tr} https://www.google.com/maps/place/${passengerLocation.latitude},${passengerLocation.longitude}.\n${' If you need to reach me, please contact the driver directly at'.tr}\n\n $driverPhone.';
// Launch the URL to send the SMS. // Launch the URL to send the WhatsApp message.
launchCommunication('whatsapp', to, message); launchCommunication('whatsapp', to, message);
} }
@@ -889,7 +888,7 @@ class MapPassengerController extends GetxController {
driverPhone = driverPhone =
dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString(); dataCarsLocationByPassenger['message'][carsOrder]['phone'].toString();
firstName = dataCarsLocationByPassenger['message'][carsOrder] firstName = dataCarsLocationByPassenger['message'][carsOrder]
['driverName'] ['first_name'] // driverName
.toString(); .toString();
carColor = carColor =
dataCarsLocationByPassenger['message'][carsOrder]['color'].toString(); dataCarsLocationByPassenger['message'][carsOrder]['color'].toString();
@@ -1338,7 +1337,9 @@ class MapPassengerController extends GetxController {
for (var i = 0; i < loopCount; i++) { for (var i = 0; i < loopCount; i++) {
// Wait for 50 seconds. // Wait for 50 seconds.
await Future.delayed(const Duration(seconds: 4)); await Future.delayed(const Duration(seconds: 4));
await getDriverCarsLocationToPassengerAfterApplied(); if (isRideFinished == true) {
await getDriverCarsLocationToPassengerAfterApplied();
}
reloadMarkerDriverCarsLocationToPassengerAfterApplied(); reloadMarkerDriverCarsLocationToPassengerAfterApplied();
} }
} }
@@ -1352,7 +1353,9 @@ class MapPassengerController extends GetxController {
// Wait for 50 seconds. // Wait for 50 seconds.
print('loop is $i from $loopCount'); print('loop is $i from $loopCount');
await Future.delayed(const Duration(seconds: 4)); await Future.delayed(const Duration(seconds: 4));
await getDriverCarsLocationToPassengerAfterApplied(); if (isRideFinished == true) {
await getDriverCarsLocationToPassengerAfterApplied();
}
reloadMarkerDriverCarsLocationToPassengerAfterApplied(); reloadMarkerDriverCarsLocationToPassengerAfterApplied();
} }
} }
@@ -1642,7 +1645,7 @@ class MapPassengerController extends GetxController {
Future getPlaces() async { Future getPlaces() async {
var url = var url =
// '${AppLink.googleMapsLink}place/nearbysearch/json?location=${mylocation.longitude}&radius=25000&language=ar&keyword=&key=${placeController.text}${AK.mapAPIKEY}'; // '${AppLink.googleMapsLink}place/nearbysearch/json?location=${mylocation.longitude}&radius=25000&language=ar&keyword=&key=${placeController.text}${AK.mapAPIKEY}';
'${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${placeDestinationController.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=${box.read(BoxName.lang)}&key=${AK.mapAPIKEY.toString()}'; '${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${placeDestinationController.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=ar&key=${AK.mapAPIKEY.toString()}';
var response = await CRUD().getGoogleApi(link: url, payload: {}); var response = await CRUD().getGoogleApi(link: url, payload: {});
@@ -1654,7 +1657,7 @@ class MapPassengerController extends GetxController {
Future getPlacesStart() async { Future getPlacesStart() async {
var url = var url =
// '${AppLink.googleMapsLink}place/nearbysearch/json?location=${mylocation.longitude}&radius=25000&language=ar&keyword=&key=${placeController.text}${AK.mapAPIKEY}'; // '${AppLink.googleMapsLink}place/nearbysearch/json?location=${mylocation.longitude}&radius=25000&language=ar&keyword=&key=${placeController.text}${AK.mapAPIKEY}';
'${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${placeStartController.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=${box.read(BoxName.lang)}&key=${AK.mapAPIKEY.toString()}'; '${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${placeStartController.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=ar&key=${AK.mapAPIKEY.toString()}';
var response = await CRUD().getGoogleApi(link: url, payload: {}); var response = await CRUD().getGoogleApi(link: url, payload: {});
@@ -1665,7 +1668,7 @@ class MapPassengerController extends GetxController {
Future getPlacesListsWayPoint(int index) async { Future getPlacesListsWayPoint(int index) async {
var url = var url =
'${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${wayPoint0Controller.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=${box.read(BoxName.lang)}&key=${AK.mapAPIKEY.toString()}'; '${AppLink.googleMapsLink}place/nearbysearch/json?keyword=${wayPoint0Controller.text}&location=${passengerLocation.latitude},${passengerLocation.longitude}&radius=50000&language=ar&key=${AK.mapAPIKEY.toString()}';
var response = await CRUD().getGoogleApi(link: url, payload: {}); var response = await CRUD().getGoogleApi(link: url, payload: {});
@@ -2619,6 +2622,7 @@ class MapPassengerController extends GetxController {
startMarkerReloading(); startMarkerReloading();
Get.put(TextToSpeechController()); Get.put(TextToSpeechController());
box.write(BoxName.carType, 'yet'); box.write(BoxName.carType, 'yet');
box.write(BoxName.tipPercentage, '0');
// await getNearestDriverByPassengerLocation(); // await getNearestDriverByPassengerLocation();
initilizeGetStorage(); initilizeGetStorage();

View File

@@ -45,12 +45,16 @@ class SplashScreenController extends GetxController
} }
void startTimer() async { void startTimer() async {
print(box.read(BoxName.email));
print(box.read(BoxName.phone));
print(box.read(BoxName.isVerified));
print('---------');
Timer(const Duration(seconds: 5), () async { Timer(const Duration(seconds: 5), () async {
box.read(BoxName.onBoarding) == null box.read(BoxName.onBoarding) == null
? Get.off(() => OnBoardingPage()) ? Get.off(() => OnBoardingPage())
: box.read(BoxName.email) != null && : box.read(BoxName.email) != null &&
box.read(BoxName.phone) != null && box.read(BoxName.phone) != null &&
box.read(BoxName.isVerified) == 'true' box.read(BoxName.isVerified) == '1'
// ? Get.off(() => const MapPagePassenger()) // ? Get.off(() => const MapPagePassenger())
? await Get.put(LoginController()).loginFromSignInGoogle( ? await Get.put(LoginController()).loginFromSignInGoogle(
box.read(BoxName.passengerID).toString(), box.read(BoxName.passengerID).toString(),

View File

@@ -10,6 +10,7 @@ import 'package:SEFER/views/home/map_page_passenger.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
import '../firebase/firbase_messge.dart'; import '../firebase/firbase_messge.dart';
import '../payment/payment_controller.dart';
// import '../home/captin/home_captain_controller.dart'; // import '../home/captin/home_captain_controller.dart';
@@ -78,7 +79,7 @@ class RateController extends GetxController {
titleStyle: AppStyle.title, titleStyle: AppStyle.title,
middleText: '', middleText: '',
confirm: MyElevatedButton(title: 'Ok', onPressed: () => Get.back())); confirm: MyElevatedButton(title: 'Ok', onPressed: () => Get.back()));
} else { } else if (Get.find<PaymentController>().isWalletChecked == true) {
var tip = (Get.find<MapPassengerController>().totalPassenger) * var tip = (Get.find<MapPassengerController>().totalPassenger) *
(double.parse(box.read(BoxName.tipPercentage.toString()))); (double.parse(box.read(BoxName.tipPercentage.toString())));
var res = await CRUD().post(link: AppLink.addTips, payload: { var res = await CRUD().post(link: AppLink.addTips, payload: {
@@ -108,17 +109,16 @@ class RateController extends GetxController {
Get.find<MapPassengerController>().driverToken.toString(), Get.find<MapPassengerController>().driverToken.toString(),
); );
} }
await CRUD().post(link: AppLink.addRateToDriver, payload: {
'passenger_id': box.read(BoxName.passengerID).toString(),
'driver_id': driverId,
'ride_id': rideId,
'rating': selectedRateItemId.toString(),
'comment': comment.text,
}).then((value) {
Get.find<MapPassengerController>().restCounter();
Get.offAll(const MapPagePassenger());
});
} }
await CRUD().post(link: AppLink.addRateToDriver, payload: {
'passenger_id': box.read(BoxName.passengerID).toString(),
'driver_id': driverId,
'ride_id': rideId,
'rating': selectedRateItemId.toString(),
'comment': comment.text,
}).then((value) {
Get.find<MapPassengerController>().restCounter();
Get.offAll(const MapPagePassenger());
});
} }
} }

View File

@@ -108,11 +108,9 @@ class RateDriverFromPassenger extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
(Get.find<PaymentController>().isCashChecked == (Get.find<PaymentController>()
false && .isWalletChecked ==
Get.find<PaymentController>() true)
.isWalletChecked ==
true)
? const DriverTipWidget() ? const DriverTipWidget()
: const SizedBox(), : const SizedBox(),
], ],

View File

@@ -1,7 +1,9 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'package:SEFER/views/auth/sms_verfy_page.dart'; import 'package:SEFER/views/auth/sms_verfy_page.dart';
import 'package:animated_text_kit/animated_text_kit.dart'; import 'package:animated_text_kit/animated_text_kit.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/gestures.dart'; import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart'; import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
@@ -15,6 +17,7 @@ import 'package:SEFER/views/widgets/my_scafold.dart';
import '../../constant/info.dart'; import '../../constant/info.dart';
import '../../constant/links.dart'; import '../../constant/links.dart';
import '../../controller/auth/apple_signin_controller.dart';
import '../../controller/auth/google_sign.dart'; 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';
@@ -25,6 +28,7 @@ import 'register_page.dart';
class LoginPage extends StatelessWidget { class LoginPage extends StatelessWidget {
final controller = Get.put(LoginController()); final controller = Get.put(LoginController());
final AuthController authController = Get.put(AuthController());
LoginPage({super.key}); LoginPage({super.key});
@@ -219,15 +223,30 @@ class LoginPage extends StatelessWidget {
}, },
kolor: AppColor.blueColor, kolor: AppColor.blueColor,
), ),
// MyElevatedButton( !Platform.isAndroid
// title: 'Sign In by Google'.tr, ? MyElevatedButton(
// onPressed: () async { title: 'Sign In by Apple'.tr,
// print(box.read(BoxName.email)); onPressed: () async {
// print(box.read(BoxName.phone)); User? user =
// print(box.read(BoxName.isVerified)); await authController.signInWithApple();
// }, if (user != null) {
// kolor: AppColor.blueColor, print(
// ), "Successfully signed in: ${user.email}");
print(
"Successfully signed in: ${user.uid}");
box.write(BoxName.driverID, user.uid);
box.write(
BoxName.emailDriver, user.email);
await GoogleSignInHelper
.signInFromLogin();
// Navigate to another screen or perform other actions
} else {
print("Sign-in failed");
}
},
kolor: AppColor.primaryColor,
)
: const SizedBox(),
], ],
), ),
)), )),

View File

@@ -1,3 +1,4 @@
import 'package:SEFER/constant/links.dart';
import 'package:SEFER/views/home/profile/feed_back_page.dart'; import 'package:SEFER/views/home/profile/feed_back_page.dart';
import 'package:SEFER/views/widgets/elevated_btn.dart'; import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -45,7 +46,7 @@ class RideBeginPassenger extends StatelessWidget {
CircleAvatar( CircleAvatar(
radius: 30, radius: 30,
backgroundImage: NetworkImage( backgroundImage: NetworkImage(
'https://ride.mobile-app.store/portrate_captain_image/${controller.driverId}.jpg'), '${AppLink.server}/portrate_captain_image/${controller.driverId}.jpg'),
), ),
Column( Column(
children: [ children: [

View File

@@ -9,6 +9,7 @@ import agora_rtc_engine
import audio_session import audio_session
import device_info_plus import device_info_plus
import file_selector_macos import file_selector_macos
import firebase_auth
import firebase_core import firebase_core
import firebase_messaging import firebase_messaging
import flutter_local_notifications import flutter_local_notifications
@@ -22,6 +23,7 @@ import location
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import record_darwin import record_darwin
import sign_in_with_apple
import sqflite import sqflite
import url_launcher_macos import url_launcher_macos
import video_player_avfoundation import video_player_avfoundation
@@ -32,6 +34,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin")) AudioSessionPlugin.register(with: registry.registrar(forPlugin: "AudioSessionPlugin"))
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin")) DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin")) FLTFirebaseMessagingPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseMessagingPlugin"))
FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin"))
@@ -45,6 +48,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin")) FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin")) RecordPlugin.register(with: registry.registrar(forPlugin: "RecordPlugin"))
SignInWithApplePlugin.register(with: registry.registrar(forPlugin: "SignInWithApplePlugin"))
SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin")) FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))

View File

@@ -13,10 +13,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: _flutterfire_internals name: _flutterfire_internals
sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7 sha256: e4be6711f96d3d4eebe79728897d645b7a5585bbfdd6d534878d202c171266d7
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.16" version: "1.3.34"
agora_rtc_engine: agora_rtc_engine:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -146,7 +146,7 @@ packages:
source: hosted source: hosted
version: "8.8.1" version: "8.8.1"
cached_network_image: cached_network_image:
dependency: "direct main" dependency: transitive
description: description:
name: cached_network_image name: cached_network_image
sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f sha256: f98972704692ba679db144261172a8e20feb145636c617af0eb4022132a6797f
@@ -177,46 +177,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.6" version: "0.0.6"
camera:
dependency: "direct main"
description:
name: camera
sha256: "7fa53bb1c2059e58bf86b7ab506e3b2a78e42f82d365b44b013239b975a166ef"
url: "https://pub.dev"
source: hosted
version: "0.10.5+7"
camera_android:
dependency: transitive
description:
name: camera_android
sha256: "7215e38fa0be58cc3203a6e48de3636fb9b1bf93d6eeedf667f882d51b3a4bf3"
url: "https://pub.dev"
source: hosted
version: "0.10.8+15"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "3c8dd395f18722f01b5f325ddd7f5256e9bcdce538fb9243b378ba759df3283c"
url: "https://pub.dev"
source: hosted
version: "0.9.13+8"
camera_platform_interface:
dependency: transitive
description:
name: camera_platform_interface
sha256: b6a568984254cadaca41a6b896d87d3b2e79a2e5791afa036f8d524c6783b93a
url: "https://pub.dev"
source: hosted
version: "2.7.0"
camera_web:
dependency: transitive
description:
name: camera_web
sha256: d4c2c571c7af04f8b10702ca16bb9ed2a26e64534171e8f75c9349b2c004d8f1
url: "https://pub.dev"
source: hosted
version: "0.3.2+3"
characters: characters:
dependency: transitive dependency: transitive
description: description:
@@ -313,14 +273,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.6" version: "1.0.6"
custom_searchable_dropdown:
dependency: "direct main"
description:
name: custom_searchable_dropdown
sha256: c2676b1ee55f0b71a7cd890ae473cf97651f018b2695b3bf57c8c28a14e2fa95
url: "https://pub.dev"
source: hosted
version: "2.1.1"
dart_style: dart_style:
dependency: transitive dependency: transitive
description: description:
@@ -338,7 +290,7 @@ packages:
source: hosted source: hosted
version: "0.7.10" version: "0.7.10"
device_info_plus: device_info_plus:
dependency: "direct main" dependency: transitive
description: description:
name: device_info_plus name: device_info_plus
sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6" sha256: "0042cb3b2a76413ea5f8a2b40cec2a33e01d0c937e91f0f7c211fde4f7739ba6"
@@ -433,14 +385,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.9.3+1" version: "0.9.3+1"
firebase_auth:
dependency: "direct main"
description:
name: firebase_auth
sha256: ea95cd29e27e8ec1971af263d74b208ce85dbc7df9197d8b5eab2aa7de7cfea8
url: "https://pub.dev"
source: hosted
version: "4.19.6"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
sha256: c252d2c97a02cf03fbf3595c5f7edf2a731062356b09d2c338f0b3d63567239f
url: "https://pub.dev"
source: hosted
version: "7.2.7"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
sha256: "5db2319d59b4bb08cf0cc26e0f110f9ae1cf9cf775ce516e5cc38cd6704253de"
url: "https://pub.dev"
source: hosted
version: "5.11.6"
firebase_core: firebase_core:
dependency: "direct main" dependency: "direct main"
description: description:
name: firebase_core name: firebase_core
sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb" sha256: "4b5100e2dbc3fe72c2d4241a046d3f01457fe11293283a324f5c52575e3406f8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.24.2" version: "2.31.1"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
@@ -453,10 +429,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0 sha256: "43d9e951ac52b87ae9cc38ecdcca1e8fa7b52a1dd26a96085ba41ce5108db8e9"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.10.0" version: "2.17.0"
firebase_messaging: firebase_messaging:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -816,22 +792,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.2" version: "2.1.2"
google_fonts:
dependency: "direct main"
description:
name: google_fonts
sha256: "6b6f10f0ce3c42f6552d1c70d2c28d764cf22bb487f50f66cca31dcd5194f4d6"
url: "https://pub.dev"
source: hosted
version: "4.0.4"
google_generative_ai:
dependency: "direct main"
description:
name: google_generative_ai
sha256: "946f37c947bbc3591ed1c2878f8a41a0f75e74468dae791f84f14db3df3f3551"
url: "https://pub.dev"
source: hosted
version: "0.0.1-dev"
google_identity_services_web: google_identity_services_web:
dependency: transitive dependency: transitive
description: description:
@@ -985,7 +945,7 @@ packages:
source: hosted source: hosted
version: "4.0.2" version: "4.0.2"
image: image:
dependency: "direct main" dependency: transitive
description: description:
name: image name: image
sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271"
@@ -1256,14 +1216,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.2.0" version: "1.2.0"
lottie:
dependency: "direct main"
description:
name: lottie
sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216
url: "https://pub.dev"
source: hosted
version: "2.7.0"
matcher: matcher:
dependency: transitive dependency: transitive
description: description:
@@ -1616,6 +1568,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.4" version: "1.0.4"
sign_in_with_apple:
dependency: "direct main"
description:
name: sign_in_with_apple
sha256: b0abd9c0d0407140829b12cd99a250f10b20352573ff08c7e0c5174c64b4973e
url: "https://pub.dev"
source: hosted
version: "6.1.0"
sign_in_with_apple_platform_interface:
dependency: transitive
description:
name: sign_in_with_apple_platform_interface
sha256: c2ef2ce6273fce0c61acd7e9ff5be7181e33d7aa2b66508b39418b786cca2119
url: "https://pub.dev"
source: hosted
version: "1.1.0"
sign_in_with_apple_web:
dependency: transitive
description:
name: sign_in_with_apple_web
sha256: c009e9beeb6c376e86aaa154fcc8b4e075d4bad90c56286b9668a51cdb6129ea
url: "https://pub.dev"
source: hosted
version: "2.1.0"
sky_engine: sky_engine:
dependency: transitive dependency: transitive
description: flutter description: flutter

View File

@@ -18,16 +18,13 @@ dependencies:
google_maps_flutter: ^2.5.0 google_maps_flutter: ^2.5.0
sqflite: ^2.3.0 sqflite: ^2.3.0
path: ^1.8.3 path: ^1.8.3
lottie: ^2.5.0
intl: ^0.18.1 intl: ^0.18.1
google_fonts: ^ 4.0.4
http: ^0.13.6 http: ^0.13.6
get: ^4.6.5 get: ^4.6.5
get_storage: ^2.1.1 get_storage: ^2.1.1
url_launcher: ^6.1.12 url_launcher: ^6.1.12
location: ^5.0.2+1 location: ^5.0.2+1
google_polyline_algorithm: ^3.1.0 google_polyline_algorithm: ^3.1.0
custom_searchable_dropdown: ^2.1.1
animated_text_kit: ^4.2.2 animated_text_kit: ^4.2.2
flutter_secure_storage: ^9.0.0 flutter_secure_storage: ^9.0.0
geolocator: ^10.0.0 geolocator: ^10.0.0
@@ -35,21 +32,20 @@ dependencies:
flutter_launcher_icons: ^0.13.1 flutter_launcher_icons: ^0.13.1
flutter_rating_bar: ^4.0.1 flutter_rating_bar: ^4.0.1
flutter_font_icons: ^2.2.5 flutter_font_icons: ^2.2.5
device_info_plus: ^9.1.0
image_picker: ^1.0.4 image_picker: ^1.0.4
flutter_stripe: ^9.5.0+1 flutter_stripe: ^9.5.0+1
camera: ^0.10.5+5 # camera: ^0.10.5+5 #to be remove
flutter_widget_from_html: ^0.14.6 flutter_widget_from_html: ^0.14.6
local_auth: ^2.1.7 local_auth: ^2.1.7
image: ^4.1.3 # image: ^4.1.3 #to be remove
image_cropper: ^4.0.1 image_cropper: ^4.0.1
envied: ^0.5.2 envied: ^0.5.2
cached_network_image: ^3.3.0 # cached_network_image: ^3.3.0
calendar_builder: ^0.0.6 calendar_builder: ^0.0.6
agora_rtc_engine: ^6.2.6 agora_rtc_engine: ^6.2.6
flutter_tts: ^3.8.5 flutter_tts: ^3.8.5
permission_handler: ^11.3.0 permission_handler: ^11.3.0
google_generative_ai: ^0.0.1-dev # google_generative_ai: ^0.0.1-dev
vibration: ^1.8.4 vibration: ^1.8.4
wakelock_plus: wakelock_plus:
record: ^5.0.5 record: ^5.0.5
@@ -58,6 +54,8 @@ dependencies:
just_audio: ^0.9.37 just_audio: ^0.9.37
share: ^2.0.4 share: ^2.0.4
google_sign_in: ^6.2.1 google_sign_in: ^6.2.1
sign_in_with_apple: ^6.1.0
firebase_auth: ^4.19.6
@@ -96,6 +94,12 @@ flutter:
- shorebird.yaml - shorebird.yaml
fonts: fonts:
- family: digital-counter-7 - family: mohanad
fonts: fonts:
- asset: assets/fonts/digital-counter-7.regular.ttf - asset: assets/fonts/mohanad.ttf
- family: josefin
fonts:
- asset: assets/fonts/josefin.ttf
- family: digit
fonts:
- asset: assets/fonts/digit.ttf

View File

@@ -8,6 +8,7 @@
#include <agora_rtc_engine/agora_rtc_engine_plugin.h> #include <agora_rtc_engine/agora_rtc_engine_plugin.h>
#include <file_selector_windows/file_selector_windows.h> #include <file_selector_windows/file_selector_windows.h>
#include <firebase_auth/firebase_auth_plugin_c_api.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h> #include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
#include <flutter_tts/flutter_tts_plugin.h> #include <flutter_tts/flutter_tts_plugin.h>
@@ -23,6 +24,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin")); registry->GetRegistrarForPlugin("AgoraRtcEnginePlugin"));
FileSelectorWindowsRegisterWithRegistrar( FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows")); registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseAuthPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterSecureStorageWindowsPluginRegisterWithRegistrar( FlutterSecureStorageWindowsPluginRegisterWithRegistrar(

View File

@@ -5,6 +5,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
agora_rtc_engine agora_rtc_engine
file_selector_windows file_selector_windows
firebase_auth
firebase_core firebase_core
flutter_secure_storage_windows flutter_secure_storage_windows
flutter_tts flutter_tts