This commit is contained in:
Hamza-Ayed
2024-05-02 12:07:38 +03:00
parent 8684223b6a
commit 9d3c522038
14 changed files with 601 additions and 460 deletions

View File

@@ -26,6 +26,7 @@ class BoxName {
static const String lastNameDriver = "lastNameDriver"; static const String lastNameDriver = "lastNameDriver";
static const String name = "name"; static const String name = "name";
static const String nameDriver = "nameDriver"; static const String nameDriver = "nameDriver";
static const String driverPhotoUrl = "driverPhotoUrl";
static const String email = "email"; static const String email = "email";
static const String emailDriver = "emailDriver"; static const String emailDriver = "emailDriver";
static const String tokens = "tokens"; static const String tokens = "tokens";

View File

@@ -0,0 +1,49 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:get/get.dart';
import 'package:google_sign_in/google_sign_in.dart';
import '../../views/auth/captin/ai_page.dart';
class GoogleSignInHelper {
static final GoogleSignIn _googleSignIn = GoogleSignIn(
scopes: [
'email',
'profile',
],
);
static Future<GoogleSignInAccount?> signIn() async {
try {
final GoogleSignInAccount? googleUser = await _googleSignIn.signIn();
getDriverInfo();
Get.to(() => AiPage());
return googleUser;
} catch (error) {
print('Google Sign-In error: $error');
return null;
}
}
static Future<void> signOut() async {
try {
await _googleSignIn.signOut();
} catch (error) {
print('Google Sign-Out error: $error');
}
}
static GoogleSignInAccount? getCurrentUser() {
return _googleSignIn.currentUser;
}
static String? getDriverInfo() {
final GoogleSignInAccount? user = _googleSignIn.currentUser;
box.write(BoxName.driverID, user!.id);
box.write(BoxName.emailDriver, user.email);
box.write(BoxName.nameDriver, user.displayName);
box.write(BoxName.driverPhotoUrl, user.photoUrl);
print('emailDriver =${box.read(BoxName.emailDriver)}');
return user.displayName;
}
}

View File

@@ -1225,6 +1225,7 @@ class MapPassengerController extends GetxController {
dataCarsLocationByPassenger = res; dataCarsLocationByPassenger = res;
update(); update();
} else { } else {
// Get.snackbar('no car', 'message');
noCarString = false; noCarString = false;
dataCarsLocationByPassenger = jsonDecode(res); dataCarsLocationByPassenger = jsonDecode(res);
//print(dataCarsLocationByPassenger); //print(dataCarsLocationByPassenger);
@@ -1234,7 +1235,7 @@ class MapPassengerController extends GetxController {
.toString(); .toString();
gender = dataCarsLocationByPassenger['message'][carsOrder]['gender'] gender = dataCarsLocationByPassenger['message'][carsOrder]['gender']
.toString(); .toString();
} // }
// //print('driverId==============$driverId'); // //print('driverId==============$driverId');
@@ -1242,7 +1243,9 @@ class MapPassengerController extends GetxController {
// late LatLng lastDriverLocation; // Initialize a variable for last location // late LatLng lastDriverLocation; // Initialize a variable for last location
for (var i = 0; i < dataCarsLocationByPassenger['message'].length; i++) { for (var i = 0;
i < dataCarsLocationByPassenger['message'].length;
i++) {
var json = dataCarsLocationByPassenger['message'][i]; var json = dataCarsLocationByPassenger['message'][i];
print(json); print(json);
CarLocationModel model = CarLocationModel.fromJson(json); CarLocationModel model = CarLocationModel.fromJson(json);
@@ -1276,6 +1279,7 @@ class MapPassengerController extends GetxController {
driversToken.add(json['token']); driversToken.add(json['token']);
} }
} }
}
update(); update();
} }

View File

@@ -570,14 +570,19 @@ class MyTranslation extends Translations {
'Pick your ride location on the map - Tap to confirm': 'Pick your ride location on the map - Tap to confirm':
'حدد موقع ‏الالتقاء على الخريطة - اضغط للتأكيد', 'حدد موقع ‏الالتقاء على الخريطة - اضغط للتأكيد',
"To Work": "إلى العمل", "To Work": "إلى العمل",
'Are you want to go this site': '‏هل تريد الذهاب إلى هذا المكان',
'Closest & Cheapest': ' الأقرب ', 'Closest & Cheapest': ' الأقرب ',
"Work Saved": "تم حفظ العمل", "Work Saved": "تم حفظ العمل",
'Sefer is the ride-hailing app that is safe, reliable, and accessible.':
'"سفر: تطبيق طلب السيارة الآمن والموثوق والمعتمد"',
'With Sefer, you can get a ride to your destination in minutes.':
'مع سفر، يمكنك الحصول على رحلة إلى وجهتك في دقائق.',
'Sefer is committed to safety, and all of our captains are carefully screened and background checked.':
'تلتزم سفر بالسلامة، ويتم فحص جميع سائقينا وفحص سجلاتهم الشخصية بعناية.',
"To Home": "إلى المنزل", "To Home": "إلى المنزل",
"Home Saved": "تم حفظ المنزل", "Home Saved": "تم حفظ المنزل",
"Destination Selected": "Destination selected": "تم تحديد الوجهة:",
"تم تحديد الوجهة:", // "Tam تحديد al-waṣʿah:", (literally "The destination has been determined:") "Now select start pick": "حدد موقع الانطلاق الآن:",
"Now select start pick":
"حدد موقع الانطلاق الآن:", // "Ḥaddid mowāqiʿ al-inṭilāq al-ʾān:", (literally "Specify the starting location now:")
"Pick from map": "اختيار من الخريطة", "Pick from map": "اختيار من الخريطة",
"Click here point": "حدد هذا المكان", "Click here point": "حدد هذا المكان",
"No Car in your site. Sorry!": "لا توجد سيارة في موقعك. آسف!", "No Car in your site. Sorry!": "لا توجد سيارة في موقعك. آسف!",

View File

@@ -92,7 +92,7 @@ class ProfileController extends GetxController {
}); });
if (res.toString() == 'failure') { if (res.toString() == 'failure') {
Get.snackbar('failure', 'message'); // Get.snackbar('failure', 'message');
isloading = false; isloading = false;
update(); update();
} else { } else {

View File

@@ -1,4 +1,5 @@
import 'package:SEFER/constant/box_name.dart'; import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/controller/functions/crud.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart'; import 'package:SEFER/constant/colors.dart';
@@ -11,6 +12,7 @@ import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/mycircular.dart'; import 'package:SEFER/views/widgets/mycircular.dart';
import '../../../constant/links.dart';
import '../../../controller/functions/gemeni.dart'; import '../../../controller/functions/gemeni.dart';
class AiPage extends StatelessWidget { class AiPage extends StatelessWidget {
@@ -21,46 +23,20 @@ class AiPage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MyScafolld( return MyScafolld(
title: 'AI Page'.tr, title: 'Documents check'.tr,
body: [ body: [
box.read(BoxName.countryCode) == 'USA' // box.read(BoxName.countryCode) == 'USA'
? Positioned( // ? UsaAiDocuments(scanDocumentsByApi: scanDocumentsByApi)
top: 3, // : box.read(BoxName.countryCode) == 'Jordan'
left: Get.width * .2, // ? JordanDocumants(contentController: contentController)
right: Get.width * .2, // :
child: MyElevatedButton( // EgyptDocuments(contentController: contentController),
title: 'Take Picture Of ID Card'.tr, // box.read(BoxName.countryCode) == 'USA'
onPressed: () { // ? usaDriverLicensWidget()
scanDocumentsByApi.scanDocumentsByApi(); // : box.read(BoxName.countryCode) == 'Jordan'
}, // ? jordanDriverLicenseWidget()
)) // :
: box.read(BoxName.countryCode) == 'Jordan' egyptDriverLicenseWidget()
? Positioned(
top: 3,
left: Get.width * .1,
right: Get.width * .1,
child: MyElevatedButton(
title: 'Take Picture Of Driver License Card'.tr,
onPressed: () {
contentController.getDriverLicenseJordanContent();
},
))
: Positioned(
top: 3,
left: Get.width * .1,
right: Get.width * .1,
child: MyElevatedButton(
title: 'Take Picture Of Driver License Card'.tr, //egypt
onPressed: () {
contentController
.getDriverLicenseJordanContent(); //egypt
},
)),
box.read(BoxName.countryCode) == 'USA'
? usaDriverLicensWidget()
: box.read(BoxName.countryCode) == 'Jordan'
? jordanDriverLicenseWidget()
: egyptDriverLicenseWidget()
], ],
isleading: true); isleading: true);
} }
@@ -87,14 +63,14 @@ class AiPage extends StatelessWidget {
child: ListView( child: ListView(
children: [ children: [
Container( Container(
decoration: AppStyle.boxDecoration, decoration: AppStyle.boxDecoration1,
// height: Get.height * .4, // height: Get.height * .4,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
child: contentController.responseMap.isEmpty child: contentController.responseMap.isEmpty
? Center( ? Center(
child: Text( child: Text(
'There is no data yet.'.tr, 'Take Picture Of ID Card'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
) )
@@ -318,45 +294,6 @@ class AiPage extends StatelessWidget {
) )
])) ]))
: const SizedBox() : const SizedBox()
// MyElevatedButton(
// title: 'Detect Your Face '.tr,
// onPressed: () => scanDocumentsByApi
// .checkMatchFaceApi(),
// ),
// scanDocumentsByApi.res.isEmpty
// ? const SizedBox()
// : scanDocumentsByApi.res['data']
// ['result']
// .toString() ==
// 'Same'
// ? MyElevatedButton(
// onPressed: () async {
// await registerCaptainController
// .register();
// await registerCaptainController
// .addLisence();
// // await scanDocumentsByApi
// // .uploadImagePortrate();
// },
// title:
// 'Go to next step\nscan Car License.'
// .tr,
// kolor: AppColor.greenColor,
// )
// : const SizedBox(),
// MyElevatedButton(
// title: 'get sql data',
// kolor: AppColor.yellowColor,
// onPressed: () {
// sql.deleteAllData(
// TableName.faceDetectTimes);
// sql
// .getAllData(
// TableName.faceDetectTimes)
// .then((value) => print(
// value[0]['faceDetectTimes']));
// },
// ),
], ],
), ),
), ),
@@ -378,15 +315,23 @@ class AiPage extends StatelessWidget {
: Column( : Column(
children: [ children: [
Container( Container(
decoration: AppStyle.boxDecoration, decoration: AppStyle.boxDecoration1,
height: Get.height * .35, height: Get.height * .35,
child: Padding( child: Padding(
padding: const EdgeInsets.all(5), padding: const EdgeInsets.all(5),
child: Center( child: Center(
child: InkWell(
onTap: () async {
await CRUD().allMethodForAI(
'name,address,dob,nationalNo,',
AppLink.uploadEgypt,
'idFront'); //egypt
},
child: Text( child: Text(
'There is no data yet.'.tr, 'Take Picture Of ID Card'.tr,
style: AppStyle.title, style: AppStyle.title,
), ),
),
)), )),
), ),
], ],
@@ -962,3 +907,73 @@ Output the extracted information in the following JSON formate and make date for
); );
} }
} }
class EgyptDocuments extends StatelessWidget {
const EgyptDocuments({
super.key,
required this.contentController,
});
final AI contentController;
@override
Widget build(BuildContext context) {
return Positioned(
top: 3,
left: Get.width * .1,
right: Get.width * .1,
child: MyElevatedButton(
title: 'Take Picture Of ID Card'.tr, //egypt
onPressed: () async {
await CRUD().allMethodForAI('name,address,dob,nationalNo,',
AppLink.uploadEgypt, 'idFront'); //egypt
},
));
}
}
class JordanDocumants extends StatelessWidget {
const JordanDocumants({
super.key,
required this.contentController,
});
final AI contentController;
@override
Widget build(BuildContext context) {
return Positioned(
top: 3,
left: Get.width * .1,
right: Get.width * .1,
child: MyElevatedButton(
title: 'Take Picture Of Driver License Card'.tr,
onPressed: () {
contentController.getDriverLicenseJordanContent();
},
));
}
}
class UsaAiDocuments extends StatelessWidget {
const UsaAiDocuments({
super.key,
required this.scanDocumentsByApi,
});
final ScanDocumentsByApi scanDocumentsByApi;
@override
Widget build(BuildContext context) {
return Positioned(
top: 3,
left: Get.width * .2,
right: Get.width * .2,
child: MyElevatedButton(
title: 'Take Picture Of ID Card'.tr,
onPressed: () {
scanDocumentsByApi.scanDocumentsByApi();
},
));
}
}

View File

@@ -1,5 +1,3 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:SEFER/controller/auth/captin/register_captin_controller.dart'; import 'package:SEFER/controller/auth/captin/register_captin_controller.dart';
@@ -7,6 +5,7 @@ import 'package:SEFER/views/widgets/elevated_btn.dart';
import 'package:SEFER/views/widgets/my_scafold.dart'; import 'package:SEFER/views/widgets/my_scafold.dart';
import '../../../constant/colors.dart'; import '../../../constant/colors.dart';
import '../../../controller/auth/google_sign.dart';
class RegisterCaptin extends StatelessWidget { class RegisterCaptin extends StatelessWidget {
const RegisterCaptin({super.key}); const RegisterCaptin({super.key});
@@ -17,150 +16,151 @@ class RegisterCaptin extends StatelessWidget {
return MyScafolld( return MyScafolld(
title: 'Register Driver'.tr, title: 'Register Driver'.tr,
body: [ body: [
GetBuilder<RegisterCaptainController>( // GetBuilder<RegisterCaptainController>(
builder: (controller) => Form( // builder: (controller) => Form(
key: controller.formKey, // key: controller.formKey,
child: Padding( // child: Padding(
padding: const EdgeInsets.all(16.0), // padding: const EdgeInsets.all(16.0),
child: SingleChildScrollView( // child: SingleChildScrollView(
child: Container( // child: Container(
decoration: const BoxDecoration( // decoration: const BoxDecoration(
boxShadow: [ // boxShadow: [
BoxShadow( // BoxShadow(
offset: Offset(3, 3), // offset: Offset(3, 3),
color: AppColor.accentColor, // color: AppColor.accentColor,
blurRadius: 3) // blurRadius: 3)
], // ],
color: AppColor.secondaryColor, // color: AppColor.secondaryColor,
), // ),
child: Padding( // child: Padding(
padding: const EdgeInsets.all(16), // padding: const EdgeInsets.all(16),
child: Column( // child: Column(
children: [ // children: [
SizedBox( // SizedBox(
width: Get.width * .8, // width: Get.width * .8,
child: TextFormField( // child: TextFormField(
keyboardType: TextInputType.emailAddress, // keyboardType: TextInputType.emailAddress,
controller: controller.emailController, // controller: controller.emailController,
decoration: InputDecoration( // decoration: InputDecoration(
focusedBorder: OutlineInputBorder( // focusedBorder: OutlineInputBorder(
borderSide: const BorderSide( // borderSide: const BorderSide(
color: AppColor.primaryColor, // color: AppColor.primaryColor,
width: 2.0, // width: 2.0,
), // ),
borderRadius: BorderRadius.circular(10), // borderRadius: BorderRadius.circular(10),
), // ),
fillColor: AppColor.accentColor, // fillColor: AppColor.accentColor,
hoverColor: AppColor.accentColor, // hoverColor: AppColor.accentColor,
focusColor: AppColor.accentColor, // focusColor: AppColor.accentColor,
border: const OutlineInputBorder( // border: const OutlineInputBorder(
borderRadius: // borderRadius:
BorderRadius.all(Radius.circular(12))), // BorderRadius.all(Radius.circular(12))),
labelText: 'Email'.tr, // labelText: 'Email'.tr,
hintText: 'Enter your email address'.tr, // hintText: 'Enter your email address'.tr,
), // ),
validator: (value) { // validator: (value) {
if (value!.isEmpty || // if (value!.isEmpty ||
(!value.contains('@') || // (!value.contains('@') ||
!value.contains('.'))) { // !value.contains('.'))) {
return 'Please enter Your Email.'.tr; // return 'Please enter Your Email.'.tr;
} // }
return null; // return null;
// },
// ),
// ),
// const SizedBox(
// height: 15,
// ),
// SizedBox(
// width: Get.width * .8,
// child: 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: 'Enter your Password'.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;
// },
// ),
// ),
// const SizedBox(
// height: 15,
// ),
// SizedBox(
// width: Get.width * .8,
// child: 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,
// ),
// MyElevatedButton(
// title: 'Next'.tr,
// onPressed: () => controller.nextToAIDetection()),
// ],
// ),
// ),
// ),
// ),
// ),
// ),
// )
Center(
child: MyElevatedButton(
title: 'Sign In by Google'.tr,
onPressed: () async {
await GoogleSignInHelper.signIn();
}, },
), kolor: AppColor.blueColor,
), ))
const SizedBox(
height: 15,
),
SizedBox(
width: Get.width * .8,
child: 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: 'Enter your Password'.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;
},
),
),
const SizedBox(
height: 15,
),
SizedBox(
width: Get.width * .8,
child: 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,
),
MyElevatedButton(
title: 'Next'.tr,
onPressed: () => controller.nextToAIDetection()),
IconButton(
onPressed: () {
print(box.write(BoxName.countryCode, 'Jordan'));
print(box.read(BoxName.countryCode));
},
icon: const Icon(Icons.add),
)
],
),
),
),
),
),
),
)
], ],
isleading: true); isleading: true);
} }

View File

@@ -19,10 +19,10 @@ GetBuilder<MapPassengerController> cancelRidePage() {
return GetBuilder<MapPassengerController>( return GetBuilder<MapPassengerController>(
builder: (controller) => controller.isCancelRidePageShown builder: (controller) => controller.isCancelRidePageShown
? Positioned( ? Positioned(
left: 60, left: Get.width * .1,
top: 40, top: Get.width * .2,
right: 60, right: Get.width * .1,
// bottom: 100, bottom: Get.width * .15,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.secondaryColor, color: AppColor.secondaryColor,

View File

@@ -222,7 +222,8 @@ GetBuilder<MapPassengerController> formSearchPlacesDestenation() {
double.parse( double.parse(
res['geometry']['location']['lat'].toString()), res['geometry']['location']['lat'].toString()),
double.parse( double.parse(
res['geometry']['location']['lng'].toString())); res['geometry']['location']['lng'].toString()),
);
controller.convertHintTextDestinationNewPlaces(index); controller.convertHintTextDestinationNewPlaces(index);
controller.placesDestination = []; controller.placesDestination = [];

View File

@@ -12,7 +12,6 @@ import '../../../constant/colors.dart';
import '../../../constant/table_names.dart'; import '../../../constant/table_names.dart';
import '../../../controller/functions/toast.dart'; import '../../../controller/functions/toast.dart';
import '../../../controller/functions/tts.dart'; import '../../../controller/functions/tts.dart';
import 'form_search_start.dart';
class MainBottomMenuMap extends StatelessWidget { class MainBottomMenuMap extends StatelessWidget {
const MainBottomMenuMap({super.key}); const MainBottomMenuMap({super.key});
@@ -103,26 +102,26 @@ class MainBottomMenuMap extends StatelessWidget {
const SizedBox( const SizedBox(
height: 10, height: 10,
), ),
MyElevatedButton( // MyElevatedButton(
title: 'Get Details of Trip'.tr, // title: 'Get Details of Trip'.tr,
onPressed: () async { // onPressed: () async {
controller.changeMainBottomMenuMap(); // controller.changeMainBottomMenuMap();
//
await controller.getMap( // await controller.getMap(
'${controller.newStartPointLocation.latitude},${controller.newStartPointLocation.longitude}', // '${controller.newStartPointLocation.latitude},${controller.newStartPointLocation.longitude}',
'${controller.newMyLocation.latitude},${controller.newMyLocation.longitude}', // '${controller.newMyLocation.latitude},${controller.newMyLocation.longitude}',
); // );
controller.currentLocationToFormPlaces = // controller.currentLocationToFormPlaces =
false; // false;
controller.placesDestination = []; // controller.placesDestination = [];
// controller.isCancelRidePageShown = true; // // controller.isCancelRidePageShown = true;
controller.clearPlacesStart(); // controller.clearPlacesStart();
controller.clearPlacesDestination(); // controller.clearPlacesDestination();
//
controller.showBottomSheet1(); // controller.showBottomSheet1();
Get.back(); // Get.back();
controller.showBottomSheet1(); // controller.showBottomSheet1();
}), // }),
TextButton( TextButton(
onPressed: () { onPressed: () {
controller.changeMainBottomMenuMap(); controller.changeMainBottomMenuMap();
@@ -303,7 +302,8 @@ class MainBottomMenuMap extends StatelessWidget {
), ),
Text( Text(
controller.passengerStartLocationFromMap controller.passengerStartLocationFromMap
? 'Pick your ride location on the map - Tap to confirm'.tr ? 'Pick or Tap to confirm'.tr
// ? 'Pick your ride location on the map - Tap to confirm'.tr
: "Click here point".tr, : "Click here point".tr,
style: AppStyle.title, style: AppStyle.title,
), ),
@@ -346,14 +346,15 @@ class MainBottomMenuMap extends StatelessWidget {
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: AppColor.redColor, color: AppColor.redColor,
), ),
child: Padding( child: null
padding: const EdgeInsets.all(6), // Padding(
child: Text( // padding: const EdgeInsets.all(6),
'No Car in your site. Sorry!'.tr, // child: Text(
style: AppStyle.title // 'No Car in your site. Sorry!'.tr,
.copyWith(color: AppColor.secondaryColor), // style: AppStyle.title
), // .copyWith(color: AppColor.secondaryColor),
), // ),
// ),
), ),
controller.noCarString == false controller.noCarString == false
? Container( ? Container(

View File

@@ -188,56 +188,59 @@ class PassengerProfilePage extends StatelessWidget {
}, },
), ),
// const Spacer(), // const Spacer(),
], Row(
), mainAxisAlignment: MainAxisAlignment.spaceAround,
), children: [
), MyElevatedButton(
)),
Positioned(
left: 70,
bottom: 100,
right: 70,
child: MyElevatedButton(
title: 'Sign Out'.tr, title: 'Sign Out'.tr,
onPressed: () { onPressed: () {
LogOutController().logOutPassenger(); LogOutController().logOutPassenger();
}), }),
), GetBuilder<LogOutController>(
Positioned( builder: (logOutController) {
left: 70,
bottom: 10,
right: 70,
child: GetBuilder<LogOutController>(builder: (logOutController) {
return MyElevatedButton( return MyElevatedButton(
title: 'Delete My Account'.tr, title: 'Delete My Account'.tr,
onPressed: () { onPressed: () {
Get.defaultDialog( Get.defaultDialog(
title: 'Are you sure to delete your account?'.tr, title:
'Are you sure to delete your account?'
.tr,
content: Form( content: Form(
key: logOutController.formKey1, key: logOutController.formKey1,
child: MyTextForm( child: MyTextForm(
controller: logOutController.emailTextController, controller: logOutController
.emailTextController,
label: 'Type your Email'.tr, label: 'Type your Email'.tr,
hint: 'Type your Email'.tr, hint: 'Type your Email'.tr,
type: TextInputType.emailAddress, type:
TextInputType.emailAddress,
), ),
), ),
confirm: MyElevatedButton( confirm: MyElevatedButton(
title: 'Delete My Account'.tr, title: 'Delete My Account'.tr,
kolor: AppColor.redColor, kolor: AppColor.redColor,
onPressed: () async { onPressed: () async {
await logOutController.deletePassengerAccount(); await logOutController
.deletePassengerAccount();
}), }),
cancel: MyElevatedButton( cancel: MyElevatedButton(
title: 'No I want'.tr, title: 'No I want'.tr,
onPressed: () { onPressed: () {
logOutController.emailTextController.clear(); logOutController
.emailTextController
.clear();
logOutController.update(); logOutController.update();
Get.back(); Get.back();
})); }));
}); });
}), }),
) ],
),
],
),
),
),
)),
], ],
); );
} }
@@ -320,7 +323,9 @@ class CountryPicker extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<ProfileController>(builder: (controller) { return GetBuilder<ProfileController>(builder: (controller) {
return ListView( return Padding(
padding: const EdgeInsets.all(20),
child: ListView(
children: [ children: [
const SizedBox( const SizedBox(
height: 20, height: 20,
@@ -378,6 +383,7 @@ class CountryPicker extends StatelessWidget {
}, },
) )
], ],
),
); );
}); });
} }
@@ -403,7 +409,9 @@ class CountryPickerFromSetting extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return GetBuilder<ProfileController>(builder: (controller) { return GetBuilder<ProfileController>(builder: (controller) {
return ListView( return Padding(
padding: const EdgeInsets.all(20.0),
child: ListView(
children: [ children: [
const SizedBox( const SizedBox(
height: 20, height: 20,
@@ -462,6 +470,7 @@ class CountryPickerFromSetting extends StatelessWidget {
}, },
) )
], ],
),
); );
}); });
} }

View File

@@ -15,6 +15,7 @@ import flutter_local_notifications
import flutter_secure_storage_macos import flutter_secure_storage_macos
import flutter_tts import flutter_tts
import geolocator_apple import geolocator_apple
import google_sign_in_ios
import iris_method_channel import iris_method_channel
import just_audio import just_audio
import location import location
@@ -37,6 +38,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin")) FlutterSecureStoragePlugin.register(with: registry.registrar(forPlugin: "FlutterSecureStoragePlugin"))
FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin")) FlutterTtsPlugin.register(with: registry.registrar(forPlugin: "FlutterTtsPlugin"))
GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin"))
FLTGoogleSignInPlugin.register(with: registry.registrar(forPlugin: "FLTGoogleSignInPlugin"))
IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin")) IrisMethodChannelPlugin.register(with: registry.registrar(forPlugin: "IrisMethodChannelPlugin"))
JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin")) JustAudioPlugin.register(with: registry.registrar(forPlugin: "JustAudioPlugin"))
LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin")) LocationPlugin.register(with: registry.registrar(forPlugin: "LocationPlugin"))

View File

@@ -856,6 +856,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.0.1-dev" version: "0.0.1-dev"
google_identity_services_web:
dependency: transitive
description:
name: google_identity_services_web
sha256: "9482364c9f8b7bd36902572ebc3a7c2b5c8ee57a9c93e6eb5099c1a9ec5265d8"
url: "https://pub.dev"
source: hosted
version: "0.3.1+1"
google_maps: google_maps:
dependency: transitive dependency: transitive
description: description:
@@ -908,18 +916,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: google_mlkit_commons name: google_mlkit_commons
sha256: "046586b381cdd139f7f6a05ad6998f7e339d061bd70158249907358394b5f496" sha256: "27d626c66a181351a953eba5b6ff1ff123aadb891b4dab085b292118f039d6ac"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.6.1" version: "0.7.1"
google_mlkit_text_recognition: google_mlkit_text_recognition:
dependency: "direct main" dependency: "direct main"
description: description:
name: google_mlkit_text_recognition name: google_mlkit_text_recognition
sha256: d484de2a10961a6f0ff8b54cc92b71bfbb0e65509be0903edca0e1f9256ca4c2 sha256: "89c848329355f165ff17ca8645cab5998770e9e25e431fe6dd8261ed9cf7bdc4"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.0" version: "0.13.0"
google_polyline_algorithm: google_polyline_algorithm:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -928,6 +936,46 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.1.0" version: "3.1.0"
google_sign_in:
dependency: "direct main"
description:
name: google_sign_in
sha256: "0b8787cb9c1a68ad398e8010e8c8766bfa33556d2ab97c439fb4137756d7308f"
url: "https://pub.dev"
source: hosted
version: "6.2.1"
google_sign_in_android:
dependency: transitive
description:
name: google_sign_in_android
sha256: "7647893c65e6720973f0e579051c8f84b877b486614d9f70a404259c41a4632e"
url: "https://pub.dev"
source: hosted
version: "6.1.23"
google_sign_in_ios:
dependency: transitive
description:
name: google_sign_in_ios
sha256: a058c9880be456f21e2e8571c1126eaacd570bdc5b6c6d9d15aea4bdf22ca9fe
url: "https://pub.dev"
source: hosted
version: "5.7.6"
google_sign_in_platform_interface:
dependency: transitive
description:
name: google_sign_in_platform_interface
sha256: "1f6e5787d7a120cc0359ddf315c92309069171306242e181c09472d1b00a2971"
url: "https://pub.dev"
source: hosted
version: "2.4.5"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
sha256: fc0f14ed45ea616a6cfb4d1c7534c2221b7092cc4f29a709f0c3053cc3e821bd
url: "https://pub.dev"
source: hosted
version: "0.12.4"
graphs: graphs:
dependency: transitive dependency: transitive
description: description:
@@ -1933,6 +1981,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.1.0" version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
web_socket_channel: web_socket_channel:
dependency: transitive dependency: transitive
description: description:
@@ -2014,5 +2070,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.2.3 <4.0.0" dart: ">=3.3.0 <4.0.0"
flutter: ">=3.16.6" flutter: ">=3.19.0"

View File

@@ -18,7 +18,6 @@ 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
# google_sign_in: ^6.1.4
lottie: ^2.5.0 lottie: ^2.5.0
intl: ^0.18.1 intl: ^0.18.1
google_fonts: ^ 4.0.4 google_fonts: ^ 4.0.4
@@ -39,7 +38,6 @@ dependencies:
flutter_font_icons: ^2.2.5 flutter_font_icons: ^2.2.5
device_info_plus: ^9.1.0 device_info_plus: ^9.1.0
image_picker: ^1.0.4 image_picker: ^1.0.4
google_mlkit_text_recognition: ^0.11.0
flutter_stripe: ^9.5.0+1 flutter_stripe: ^9.5.0+1
camera: ^0.10.5+5 camera: ^0.10.5+5
flutter_widget_from_html: ^0.14.6 flutter_widget_from_html: ^0.14.6
@@ -57,13 +55,13 @@ dependencies:
vibration: ^1.8.4 vibration: ^1.8.4
wakelock_plus: wakelock_plus:
background_location: ^0.13.0 background_location: ^0.13.0
# flutter_sound: ^9.2.13
record: ^5.0.5 record: ^5.0.5
dio: ^5.4.3+1 dio: ^5.4.3+1
# paymob_payment: ^0.0.1+1
webview_flutter: ^4.7.0 webview_flutter: ^4.7.0
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_mlkit_text_recognition: ^0.13.0