12/3/1
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -45,7 +45,7 @@ app.*.map.json
|
|||||||
/android/gradle.properties
|
/android/gradle.properties
|
||||||
|
|
||||||
# Environment-specific files
|
# Environment-specific files
|
||||||
.env.
|
.env
|
||||||
lib/env/env.dart
|
lib/env/env.dart
|
||||||
lib/env/env.g.dart
|
lib/env/env.g.dart
|
||||||
lib/constant/api_keys.json
|
lib/constant/api_keys.json
|
||||||
|
|||||||
@@ -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 11
|
versionCode 12
|
||||||
versionName '1.1.1'
|
versionName '1.1.6'
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 25 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB |
@@ -1,7 +1,7 @@
|
|||||||
import 'package:ride/env/env.dart';
|
import 'package:ride/env/env.dart';
|
||||||
|
|
||||||
class AppLink {
|
class AppLink {
|
||||||
static final String server = Env.serverPHP; //Env.serverPHP;
|
static final String server = Env.serverPHP;
|
||||||
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
static String googleMapsLink = 'https://maps.googleapis.com/maps/api/';
|
||||||
static String llama = 'https://api.llama-api.com/chat/completions';
|
static String llama = 'https://api.llama-api.com/chat/completions';
|
||||||
|
|
||||||
@@ -13,6 +13,7 @@ class AppLink {
|
|||||||
|
|
||||||
//=======================Wallet===================
|
//=======================Wallet===================
|
||||||
static String wallet = '$server/ride/passengerWallet/';
|
static String wallet = '$server/ride/passengerWallet/';
|
||||||
|
static String walletDriver = '$server/ride/driverWallet/';
|
||||||
static String getAllPassengerTransaction =
|
static String getAllPassengerTransaction =
|
||||||
"$wallet/getAllPassengerTransaction.php";
|
"$wallet/getAllPassengerTransaction.php";
|
||||||
static String getWalletByPassenger = "$wallet/getWalletByPassenger.php";
|
static String getWalletByPassenger = "$wallet/getWalletByPassenger.php";
|
||||||
@@ -21,6 +22,12 @@ class AppLink {
|
|||||||
static String deletePassengersWallet = "$wallet/delete.php";
|
static String deletePassengersWallet = "$wallet/delete.php";
|
||||||
static String updatePassengersWallet = "$wallet/update.php";
|
static String updatePassengersWallet = "$wallet/update.php";
|
||||||
|
|
||||||
|
static String getWalletByDriver = "$walletDriver/getWalletByDriver.php";
|
||||||
|
static String getDriversWallet = "$walletDriver/get.php";
|
||||||
|
static String addDriversWallet = "$walletDriver/add.php";
|
||||||
|
static String deleteDriversWallet = "$walletDriver/delete.php";
|
||||||
|
static String updateDriversWallet = "$walletDriver/update.php";
|
||||||
|
|
||||||
//=======================promo===================ride.mobile-app.store/ride/promo/get.php
|
//=======================promo===================ride.mobile-app.store/ride/promo/get.php
|
||||||
static String promo = '$server/ride/promo';
|
static String promo = '$server/ride/promo';
|
||||||
static String getPassengersPromo = "$promo/get.php";
|
static String getPassengersPromo = "$promo/get.php";
|
||||||
@@ -44,8 +51,17 @@ class AppLink {
|
|||||||
|
|
||||||
//-----------------DriverPayment------------------
|
//-----------------DriverPayment------------------
|
||||||
static String addDriverpayment = "$ride/payment/add.php";
|
static String addDriverpayment = "$ride/payment/add.php";
|
||||||
|
static String addDriverPaymentPoints = "$ride/driverPayment/add.php";
|
||||||
|
static String getDriverPaymentPoints = "$ride/driverWallet/get.php";
|
||||||
static String getDriverpaymentToday = "$ride/payment/get.php";
|
static String getDriverpaymentToday = "$ride/payment/get.php";
|
||||||
static String getAllPayment = "$ride/payment/getAllPayment.php";
|
static String getAllPaymentFromRide = "$ride/payment/getAllPayment.php";
|
||||||
|
//-----------------Driver NotificationCaptain------------------
|
||||||
|
static String addNotificationCaptain = "$ride/notificationCaptain/add.php";
|
||||||
|
static String getNotificationCaptain = "$ride/notificationCaptain/get.php";
|
||||||
|
static String updateNotificationCaptain =
|
||||||
|
"$ride/notificationCaptain/update.php";
|
||||||
|
static String deleteNotificationCaptain =
|
||||||
|
"$ride/notificationCaptain/delete.php";
|
||||||
//-----------------Api Key------------------
|
//-----------------Api Key------------------
|
||||||
static String addApiKey = "$ride/apiKey/add.php";
|
static String addApiKey = "$ride/apiKey/add.php";
|
||||||
static String getApiKey = "$ride/apiKey/get.php";
|
static String getApiKey = "$ride/apiKey/get.php";
|
||||||
@@ -56,6 +72,14 @@ class AppLink {
|
|||||||
static String addFeedBack = "$ride/feedBack/add.php";
|
static String addFeedBack = "$ride/feedBack/add.php";
|
||||||
static String getFeedBack = "$ride/feedBack/get.php";
|
static String getFeedBack = "$ride/feedBack/get.php";
|
||||||
static String updateFeedBack = "$ride/feedBack/updateFeedBack.php";
|
static String updateFeedBack = "$ride/feedBack/updateFeedBack.php";
|
||||||
|
|
||||||
|
//-----------------Help Center------------------
|
||||||
|
static String addhelpCenter = "$ride/helpCenter/add.php";
|
||||||
|
static String gethelpCenter = "$ride/helpCenter/get.php";
|
||||||
|
static String getByIdhelpCenter = "$ride/helpCenter/getById.php";
|
||||||
|
static String updatehelpCenter = "$ride/helpCenter/update.php";
|
||||||
|
static String deletehelpCenter = "$ride/helpCenter/delete.php";
|
||||||
|
|
||||||
//-----------------license------------------
|
//-----------------license------------------
|
||||||
static String addLicense = "$ride/license/add.php";
|
static String addLicense = "$ride/license/add.php";
|
||||||
static String getLicense = "$ride/license/get.php";
|
static String getLicense = "$ride/license/get.php";
|
||||||
@@ -63,8 +87,7 @@ class AppLink {
|
|||||||
//-----------------RegisrationCar------------------
|
//-----------------RegisrationCar------------------
|
||||||
static String addRegisrationCar = "$ride/RegisrationCar/add.php";
|
static String addRegisrationCar = "$ride/RegisrationCar/add.php";
|
||||||
static String getRegisrationCar = "$ride/RegisrationCar/get.php";
|
static String getRegisrationCar = "$ride/RegisrationCar/get.php";
|
||||||
static String updateRegisrationCar =
|
static String updateRegisrationCar = "$ride/RegisrationCar/update.php";
|
||||||
"$ride/RegisrationCar/updateFeedBack.php";
|
|
||||||
|
|
||||||
//-----------------DriverOrder------------------
|
//-----------------DriverOrder------------------
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,5 @@ class TableName {
|
|||||||
static const String carLocations = "carLocations";
|
static const String carLocations = "carLocations";
|
||||||
static const String driverOrdersRefuse = "driverOrdersRefuse";
|
static const String driverOrdersRefuse = "driverOrdersRefuse";
|
||||||
static const String faceDetectTimes = "faceDetectTimes";
|
static const String faceDetectTimes = "faceDetectTimes";
|
||||||
|
static const String captainNotification = "captainNotification";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/constant/table_names.dart';
|
||||||
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
|
import '../../../constant/box_name.dart';
|
||||||
|
import '../../../constant/links.dart';
|
||||||
|
import '../../../main.dart';
|
||||||
|
import '../../functions/crud.dart';
|
||||||
|
|
||||||
|
class NotificationCaptainController extends GetxController {
|
||||||
|
bool isloading = false;
|
||||||
|
Map notificationData = {};
|
||||||
|
|
||||||
|
getNotifications() async {
|
||||||
|
isloading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getNotificationCaptain,
|
||||||
|
payload: {'driverID': box.read(BoxName.driverID)});
|
||||||
|
if (res == "failure") {
|
||||||
|
// print(res);
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'There is no notification yet'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
middleText: '',
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Back',
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
notificationData = jsonDecode(res);
|
||||||
|
// sql.insertData(notificationData['message'], TableName.captainNotification);
|
||||||
|
|
||||||
|
// print(notificationData);
|
||||||
|
isloading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
updateNotification(String id) async {
|
||||||
|
await CRUD().post(
|
||||||
|
link: AppLink.updateNotificationCaptain,
|
||||||
|
payload: {'isShown': true, 'id': id},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
getNotifications();
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,6 +12,7 @@ import 'package:ride/views/auth/captin/login_captin.dart';
|
|||||||
import 'package:ride/views/auth/captin/verify_email_captain.dart';
|
import 'package:ride/views/auth/captin/verify_email_captain.dart';
|
||||||
|
|
||||||
import '../../../views/auth/captin/ai_page.dart';
|
import '../../../views/auth/captin/ai_page.dart';
|
||||||
|
import '../../../views/auth/captin/car_license_page.dart';
|
||||||
import '../../../views/auth/verify_email_page.dart';
|
import '../../../views/auth/verify_email_page.dart';
|
||||||
|
|
||||||
class RegisterCaptainController extends GetxController {
|
class RegisterCaptainController extends GetxController {
|
||||||
@@ -76,7 +77,7 @@ class RegisterCaptainController extends GetxController {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res != 'failure') {
|
if (res != 'failure') {
|
||||||
Get.offAll(() => LoginCaptin());
|
Get.to(() => CarLicensePage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,7 +106,7 @@ class RegisterCaptainController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void addLisence() async {
|
Future addLisence() async {
|
||||||
getFromController();
|
getFromController();
|
||||||
var res = await CRUD().post(link: AppLink.addLicense, payload: {
|
var res = await CRUD().post(link: AppLink.addLicense, payload: {
|
||||||
'name': name,
|
'name': name,
|
||||||
@@ -114,7 +115,7 @@ class RegisterCaptainController extends GetxController {
|
|||||||
'address': address,
|
'address': address,
|
||||||
'height': height,
|
'height': height,
|
||||||
'postalCode': postalCode,
|
'postalCode': postalCode,
|
||||||
'sex': sex == 'M' ? 'Male' : 'Female',
|
'sex': sex,
|
||||||
'stateCode': stateCode,
|
'stateCode': stateCode,
|
||||||
'expireDate': expireDate,
|
'expireDate': expireDate,
|
||||||
'dateOfBirth': dob,
|
'dateOfBirth': dob,
|
||||||
@@ -152,11 +153,11 @@ class RegisterCaptainController extends GetxController {
|
|||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
if (jsonDecode(res)['status'] == 'success') {
|
if (jsonDecode(res)['status'] == 'success') {
|
||||||
// Get.to(() => AiPage()); //todo replace this
|
Get.offAll(() => LoginCaptin()); //todo replace this
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void register() async {
|
Future register() async {
|
||||||
getFromController();
|
getFromController();
|
||||||
if (formKey.currentState!.validate()) {
|
if (formKey.currentState!.validate()) {
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
@@ -171,11 +172,11 @@ class RegisterCaptainController extends GetxController {
|
|||||||
'site': address,
|
'site': address,
|
||||||
'birthdate': dob,
|
'birthdate': dob,
|
||||||
});
|
});
|
||||||
print(jsonDecode(res));
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
if (jsonDecode(res)['status'] == 'success') {
|
if (jsonDecode(res)['status'] == 'success') {
|
||||||
print('sdfffffffffff');
|
box.write(BoxName.driverID, jsonDecode(res)['message']);
|
||||||
box.write(BoxName.dobDriver, dob);
|
box.write(BoxName.dobDriver, dob);
|
||||||
box.write(BoxName.sexDriver, sex);
|
box.write(BoxName.sexDriver, sex);
|
||||||
box.write(BoxName.phoneDriver, phoneController.text);
|
box.write(BoxName.phoneDriver, phoneController.text);
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
var myList = jsonDecode(myListString) as List<dynamic>;
|
var myList = jsonDecode(myListString) as List<dynamic>;
|
||||||
driverToken = myList[14].toString();
|
driverToken = myList[14].toString();
|
||||||
update();
|
update();
|
||||||
print('driverToken==============' + driverToken.toString());
|
print('driverToken==============$driverToken');
|
||||||
Get.to(() => OrderRequestPage(), arguments: {
|
Get.to(() => OrderRequestPage(), arguments: {
|
||||||
'myListString': myListString,
|
'myListString': myListString,
|
||||||
'DriverList': myList,
|
'DriverList': myList,
|
||||||
@@ -191,12 +191,13 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
||||||
// mapController.driverArrivePassenger();
|
// mapController.driverArrivePassenger();
|
||||||
update();
|
update();
|
||||||
} else if (message.notification!.title!.contains('isRideFinished')) {
|
} else if (message.notification!.title!
|
||||||
MapPassengerController mapController =
|
.contains('Captain Finish Trip')) {
|
||||||
Get.find<MapPassengerController>();
|
// MapPassengerController mapController =
|
||||||
|
// Get.find<MapPassengerController>();
|
||||||
Get.snackbar('Ride Finished'.tr, '',
|
Get.snackbar('Ride Finished'.tr, '',
|
||||||
backgroundColor: AppColor.greenColor);
|
backgroundColor: AppColor.greenColor);
|
||||||
mapController.isRideFinished = true;
|
// mapController.isRideFinished = true;//todo fix that for dfinish ride in passenger app
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -311,8 +312,8 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
Get.find<MapPassengerController>();
|
Get.find<MapPassengerController>();
|
||||||
mapController.rideConfirm = false;
|
mapController.rideConfirm = false;
|
||||||
update();
|
update();
|
||||||
print('-----------------------------rideConfirm===' +
|
print(
|
||||||
mapController.rideConfirm.toString());
|
'-----------------------------rideConfirm===${mapController.rideConfirm}');
|
||||||
|
|
||||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||||
driverID = myList[2].toString();
|
driverID = myList[2].toString();
|
||||||
|
|||||||
@@ -26,13 +26,13 @@ class CRUD {
|
|||||||
// 'Basic ${base64Encode(utf8.encode(basicAuthCredentials.toString()))}',
|
// 'Basic ${base64Encode(utf8.encode(basicAuthCredentials.toString()))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
// print("-----request----" + response.request.toString());
|
print("-----request----" + response.request.toString());
|
||||||
// print("-----headers-----" + response.headers.toString());
|
// print("-----headers-----" + response.headers.toString());
|
||||||
// print("-----payload-----" + payload.toString());
|
print("-----payload-----" + payload.toString());
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
// print(jsonData);
|
print(jsonData);
|
||||||
|
|
||||||
return response.body;
|
return response.body;
|
||||||
}
|
}
|
||||||
@@ -148,17 +148,17 @@ class CRUD {
|
|||||||
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//print(response.request);
|
print(response.request);
|
||||||
//print(payload);
|
//print(payload);
|
||||||
|
|
||||||
var jsonData = jsonDecode(response.body);
|
var jsonData = jsonDecode(response.body);
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
Get.snackbar(
|
// Get.snackbar(
|
||||||
jsonData['status'],
|
// jsonData['status'],
|
||||||
jsonData['message'],
|
// jsonData['message'],
|
||||||
);
|
// );
|
||||||
//print(response.body);
|
// print(response.body);
|
||||||
return response.body;
|
return response.body;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -192,10 +192,10 @@ class CRUD {
|
|||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
if (jsonData['status'] == 'success') {
|
if (jsonData['status'] == 'success') {
|
||||||
Get.back();
|
Get.back();
|
||||||
Get.snackbar(
|
// Get.snackbar(
|
||||||
jsonData['status'],
|
// jsonData['status'],
|
||||||
jsonData['message'],
|
// jsonData['message'],
|
||||||
);
|
// );
|
||||||
|
|
||||||
return response.body;
|
return response.body;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ import 'package:ride/constant/api_key.dart';
|
|||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/constant/colors.dart';
|
import 'package:ride/constant/colors.dart';
|
||||||
import 'package:ride/constant/info.dart';
|
import 'package:ride/constant/info.dart';
|
||||||
import 'package:ride/constant/links.dart';
|
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
import 'package:ride/constant/table_names.dart';
|
import 'package:ride/constant/table_names.dart';
|
||||||
import 'package:ride/main.dart';
|
import 'package:ride/main.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
import '../../views/auth/captin/car_license_page.dart';
|
import '../../constant/links.dart';
|
||||||
|
import '../auth/captin/register_captin_controller.dart';
|
||||||
import 'launch.dart';
|
import 'launch.dart';
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -227,6 +227,7 @@ class ScanDocumentsByApi extends GetxController {
|
|||||||
late Uint8List imageSignature;
|
late Uint8List imageSignature;
|
||||||
late Uint8List imageDocumentFrontSide;
|
late Uint8List imageDocumentFrontSide;
|
||||||
XFile? image;
|
XFile? image;
|
||||||
|
XFile? imagePortraitFile;
|
||||||
XFile? imageFace;
|
XFile? imageFace;
|
||||||
late File tempFile;
|
late File tempFile;
|
||||||
late String imagePath;
|
late String imagePath;
|
||||||
@@ -327,6 +328,7 @@ class ScanDocumentsByApi extends GetxController {
|
|||||||
await tempFile.writeAsBytes(imagePortrait);
|
await tempFile.writeAsBytes(imagePortrait);
|
||||||
|
|
||||||
imagePath = tempFile.path;
|
imagePath = tempFile.path;
|
||||||
|
// imagePortraitFile=File(imagePath) ;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
// Handle error or provide a default value
|
// Handle error or provide a default value
|
||||||
@@ -446,7 +448,7 @@ class ScanDocumentsByApi extends GetxController {
|
|||||||
},
|
},
|
||||||
)) //
|
)) //
|
||||||
: Get.defaultDialog(
|
: Get.defaultDialog(
|
||||||
barrierDismissible: false,
|
// barrierDismissible: false,
|
||||||
title: 'Image detecting result is '.tr,
|
title: 'Image detecting result is '.tr,
|
||||||
titleStyle: AppStyle.title,
|
titleStyle: AppStyle.title,
|
||||||
content: Column(
|
content: Column(
|
||||||
@@ -478,47 +480,59 @@ class ScanDocumentsByApi extends GetxController {
|
|||||||
: MyElevatedButton(
|
: MyElevatedButton(
|
||||||
title: 'Next'.tr,
|
title: 'Next'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await uploadImage(
|
RegisterCaptainController registerCaptainController =
|
||||||
tempFile, AppLink.uploadImagePortrate);
|
Get.put(RegisterCaptainController());
|
||||||
Get.to(() => CarLicensePage());
|
|
||||||
|
await registerCaptainController.register();
|
||||||
|
await registerCaptainController.addLisence();
|
||||||
|
await uploadImagePortrate();
|
||||||
|
// Get.to(() => CarLicensePage());
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// await uploadImage(
|
||||||
|
// tempFile, AppLink.uploadImagePortrate);
|
||||||
|
// Get.to(() => CarLicensePage());
|
||||||
|
// },
|
||||||
kolor: AppColor.greenColor,
|
kolor: AppColor.greenColor,
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
print(response.reasonPhrase);
|
print(response.reasonPhrase);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Todo upload images and fields
|
|
||||||
|
|
||||||
Future<String> uploadImage(File imageFile, String link) async {
|
// Todo upload images and fields
|
||||||
String? basicAuthCredentials =
|
Future<String> uploadImagePortrate() async {
|
||||||
await storage.read(key: BoxName.basicAuthCredentials);
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
|
||||||
var request = http.MultipartRequest(
|
var request = http.MultipartRequest(
|
||||||
'POST',
|
'POST',
|
||||||
Uri.parse(link), //AppLink.uploadImage
|
Uri.parse(AppLink.uploadImagePortrate),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Attach the image file to the request
|
|
||||||
request.files.add(
|
request.files.add(
|
||||||
await http.MultipartFile.fromPath('image', imageFile.path),
|
http.MultipartFile.fromBytes('image', imagePortrait),
|
||||||
); // Add the headers to the request
|
);
|
||||||
request.headers.addAll({
|
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
request.headers.addAll({
|
||||||
'Authorization':
|
"Content-Type": "multipart/form-data",
|
||||||
'Basic ${base64Encode(utf8.encode(basicAuthCredentials.toString()))}',
|
'Authorization':
|
||||||
});
|
'Basic ${base64Encode(utf8.encode(AK.basicAuthCredentials))}',
|
||||||
|
});
|
||||||
|
request.fields['driverID'] =
|
||||||
|
'bnbn'; // box.read(BoxName.driverID).toString();
|
||||||
|
|
||||||
// Add the driverID to the request
|
|
||||||
request.fields['driverID'] = box.read(BoxName.driverID);
|
|
||||||
// Send the request
|
|
||||||
var response = await request.send();
|
var response = await request.send();
|
||||||
|
|
||||||
// Read the response
|
|
||||||
var responseData = await response.stream.toBytes();
|
var responseData = await response.stream.toBytes();
|
||||||
var responseString = String.fromCharCodes(responseData);
|
var responseString = String.fromCharCodes(responseData);
|
||||||
// scannedText = responseString;
|
|
||||||
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
// Return the link received from the server
|
|
||||||
|
// Print the response string
|
||||||
|
print(responseString);
|
||||||
|
|
||||||
return responseString;
|
return responseString;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
93
lib/controller/home/captin/help/help_controller.dart
Normal file
93
lib/controller/home/captin/help/help_controller.dart
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../../../constant/box_name.dart';
|
||||||
|
import '../../../../constant/links.dart';
|
||||||
|
import '../../../../constant/style.dart';
|
||||||
|
import '../../../../main.dart';
|
||||||
|
import '../../../../views/widgets/elevated_btn.dart';
|
||||||
|
import '../../../functions/crud.dart';
|
||||||
|
|
||||||
|
class HelpController extends GetxController {
|
||||||
|
bool isLoading = false;
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
|
final helpQuestionController = TextEditingController();
|
||||||
|
Map helpQuestionDate = {};
|
||||||
|
Map helpQuestionRepleyDate = {};
|
||||||
|
String status = '';
|
||||||
|
String qustion = '';
|
||||||
|
late int indexQuestion = 0;
|
||||||
|
getindex(int i, String qustion1) async {
|
||||||
|
indexQuestion = i;
|
||||||
|
qustion = qustion1;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void addHelpQuestion() async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().post(link: AppLink.addhelpCenter, payload: {
|
||||||
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
|
'helpQuestion': helpQuestionController.text
|
||||||
|
});
|
||||||
|
var d = jsonDecode(res);
|
||||||
|
// print(d);
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
if (d['status'].toString() == 'success') {
|
||||||
|
getHelpQuestion();
|
||||||
|
// Get.snackbar('Feedback data saved successfully'.tr, '',
|
||||||
|
// backgroundColor: AppColor.greenColor,
|
||||||
|
// snackPosition: SnackPosition.BOTTOM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void getHelpQuestion() async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().get(link: AppLink.gethelpCenter, payload: {
|
||||||
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
|
});
|
||||||
|
if (res == "failure") {
|
||||||
|
// print(res);
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'There is no help Question here'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
middleText: '',
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Back',
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
helpQuestionDate = jsonDecode(res);
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getHelpRepley(String id) async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().get(link: AppLink.getByIdhelpCenter, payload: {
|
||||||
|
'id': id,
|
||||||
|
});
|
||||||
|
print(res);
|
||||||
|
if (res == "failure") {
|
||||||
|
status = 'not yet';
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
helpQuestionRepleyDate = jsonDecode(res);
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
getHelpQuestion();
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -186,7 +186,7 @@ class HomeCaptainController extends GetxController {
|
|||||||
|
|
||||||
getAllPayment() async {
|
getAllPayment() async {
|
||||||
var res = await CRUD().get(
|
var res = await CRUD().get(
|
||||||
link: AppLink.getAllPayment,
|
link: AppLink.getAllPaymentFromRide,
|
||||||
payload: {'driverID': box.read(BoxName.driverID).toString()});
|
payload: {'driverID': box.read(BoxName.driverID).toString()});
|
||||||
data = jsonDecode(res);
|
data = jsonDecode(res);
|
||||||
|
|
||||||
|
|||||||
@@ -198,12 +198,26 @@ class MapDriverController extends GetxController {
|
|||||||
'passengerID': passengerId,
|
'passengerID': passengerId,
|
||||||
'driverID': box.read(BoxName.driverID).toString(),
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
});
|
});
|
||||||
|
|
||||||
await CRUD().post(link: AppLink.updateRides, payload: {
|
await CRUD().post(link: AppLink.updateRides, payload: {
|
||||||
'id': rideId,
|
'id': rideId,
|
||||||
'rideTimeStart': DateTime.now().toString(),
|
'rideTimeStart': DateTime.now().toString(),
|
||||||
'status': 'Begin'
|
'status': 'Begin'
|
||||||
});
|
});
|
||||||
rideIsBeginPassengerTimer();
|
rideIsBeginPassengerTimer();
|
||||||
|
double pointsSubstraction = 0;
|
||||||
|
pointsSubstraction = double.parse(paymentAmount) * -100;
|
||||||
|
var res = await CRUD().post(link: AppLink.addDriversWallet, payload: {
|
||||||
|
'paymentID': 'rideId$rideId',
|
||||||
|
'amount': (pointsSubstraction).toString(),
|
||||||
|
'paymentMethod': paymentMethod,
|
||||||
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
|
});
|
||||||
|
var d = jsonDecode(res);
|
||||||
|
print('...................');
|
||||||
|
print(d);
|
||||||
|
print('...................');
|
||||||
|
|
||||||
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||||
// 'RideIsBegin', box.read(BoxName.name).toString(), tokenPassenger);
|
// 'RideIsBegin', box.read(BoxName.name).toString(), tokenPassenger);
|
||||||
}
|
}
|
||||||
@@ -225,8 +239,10 @@ class MapDriverController extends GetxController {
|
|||||||
'passengerId': passengerId,
|
'passengerId': passengerId,
|
||||||
'driverId': driverId
|
'driverId': driverId
|
||||||
});
|
});
|
||||||
// FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
FirebaseMessagesController().sendNotificationToAnyWithoutData(
|
||||||
// 'isRideFinished', box.read(BoxName.name).toString(), tokenPassenger);
|
'Captain Finish Trip',
|
||||||
|
box.read(BoxName.name).toString(),
|
||||||
|
tokenPassenger);
|
||||||
}
|
}
|
||||||
|
|
||||||
String canelString = '';
|
String canelString = '';
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ class MapPassengerController extends GetxController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void delayAndFetchRideStatus(String rideId) {
|
void delayAndFetchRideStatus(String rideId) {
|
||||||
Timer(const Duration(seconds: 1), () async {
|
Timer(const Duration(milliseconds: 200), () async {
|
||||||
if (shouldFetch) {
|
if (shouldFetch) {
|
||||||
// print('shouldFetch is =$shouldFetch');
|
// print('shouldFetch is =$shouldFetch');
|
||||||
var res = await CRUD()
|
var res = await CRUD()
|
||||||
@@ -357,13 +357,18 @@ class MapPassengerController extends GetxController {
|
|||||||
print(decod['data']);
|
print(decod['data']);
|
||||||
if (decod['data'].toString() == 'Apply') {
|
if (decod['data'].toString() == 'Apply') {
|
||||||
shouldFetch = false; // Stop further fetches
|
shouldFetch = false; // Stop further fetches
|
||||||
// rideConfirm = false;
|
rideConfirm = false;
|
||||||
update();
|
update();
|
||||||
startTimer();
|
startTimer();
|
||||||
} else if (decod['data'].toString() == 'Refused') {
|
} else if (decod['data'].toString() == 'Refused') {
|
||||||
if (dataCarsLocationByPassenger.length > carsOrder) {
|
carsOrder = carsOrder + 1;
|
||||||
carsOrder++;
|
update();
|
||||||
update();
|
print(dataCarsLocationByPassenger['message'].length);
|
||||||
|
print(dataCarsLocationByPassenger['message']);
|
||||||
|
print(carsOrder);
|
||||||
|
|
||||||
|
if (carsOrder < dataCarsLocationByPassenger['message'].length) {
|
||||||
|
print('55555555555555555555');
|
||||||
changeConfirmRide();
|
changeConfirmRide();
|
||||||
} else {
|
} else {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
@@ -374,7 +379,7 @@ class MapPassengerController extends GetxController {
|
|||||||
onPressed: () => Get.offAll(const MapPagePassenger()),
|
onPressed: () => Get.offAll(const MapPagePassenger()),
|
||||||
));
|
));
|
||||||
|
|
||||||
// cancelRide();
|
cancelRideAfterRejectFromAll();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
delayAndFetchRideStatus(
|
delayAndFetchRideStatus(
|
||||||
@@ -548,6 +553,26 @@ class MapPassengerController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> cancelRideAfterRejectFromAll() async {
|
||||||
|
clearPlaces();
|
||||||
|
clearPolyline();
|
||||||
|
data = [];
|
||||||
|
await CRUD().post(link: AppLink.updateDriverOrder, payload: {
|
||||||
|
"order_id": rideId.toString(), // Convert to String
|
||||||
|
"status": 'Cancel'
|
||||||
|
});
|
||||||
|
rideConfirm = false;
|
||||||
|
shouldFetch = false;
|
||||||
|
isPassengerChosen = false;
|
||||||
|
isCashConfirmPageShown = false;
|
||||||
|
isCashSelectedBeforeConfirmRide = false;
|
||||||
|
timeToPassengerFromDriverAfterApplied = 0;
|
||||||
|
changeCancelRidePageShow();
|
||||||
|
remainingTime = 0;
|
||||||
|
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
Future cancelRide() async {
|
Future cancelRide() async {
|
||||||
print("rideConfirm=$rideConfirm");
|
print("rideConfirm=$rideConfirm");
|
||||||
|
|
||||||
@@ -558,8 +583,9 @@ class MapPassengerController extends GetxController {
|
|||||||
changeCancelRidePageShow();
|
changeCancelRidePageShow();
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
isCashSelectedBeforeConfirmRide = false;
|
isCashConfirmPageShown = false;
|
||||||
isPassengerChosen = false;
|
isPassengerChosen = false;
|
||||||
|
isCashSelectedBeforeConfirmRide = false;
|
||||||
timeToPassengerFromDriverAfterApplied = 0;
|
timeToPassengerFromDriverAfterApplied = 0;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
@@ -573,6 +599,7 @@ class MapPassengerController extends GetxController {
|
|||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
isPassengerChosen = false;
|
isPassengerChosen = false;
|
||||||
|
isCashConfirmPageShown = false;
|
||||||
isCashSelectedBeforeConfirmRide = false;
|
isCashSelectedBeforeConfirmRide = false;
|
||||||
timeToPassengerFromDriverAfterApplied = 0;
|
timeToPassengerFromDriverAfterApplied = 0;
|
||||||
changeCancelRidePageShow();
|
changeCancelRidePageShow();
|
||||||
|
|||||||
73
lib/controller/home/payment/captain_wallet_controller.dart
Normal file
73
lib/controller/home/payment/captain_wallet_controller.dart
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/box_name.dart';
|
||||||
|
import 'package:ride/constant/links.dart';
|
||||||
|
import 'package:ride/controller/functions/crud.dart';
|
||||||
|
import 'package:ride/main.dart';
|
||||||
|
|
||||||
|
class CaptainWalletController extends GetxController {
|
||||||
|
bool isLoading = false;
|
||||||
|
Map walletDate = {};
|
||||||
|
Map walletDriverPointsDate = {};
|
||||||
|
final formKey = GlobalKey<FormState>();
|
||||||
|
String totalAmount = '0';
|
||||||
|
String totalPoints = '0';
|
||||||
|
Future getCaptainWalletFromRide() async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getAllPaymentFromRide,
|
||||||
|
payload: {'driverID': box.read(BoxName.driverID)},
|
||||||
|
);
|
||||||
|
walletDate = jsonDecode(res);
|
||||||
|
totalAmount = walletDate['message'][0]['total_amount'].toString() == null
|
||||||
|
? '0'
|
||||||
|
: walletDate['message'][0]['total_amount'];
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getCaptainWalletFromBuyPoints() async {
|
||||||
|
isLoading = true;
|
||||||
|
update();
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getDriverPaymentPoints,
|
||||||
|
payload: {'driverID': box.read(BoxName.driverID)},
|
||||||
|
);
|
||||||
|
walletDriverPointsDate = jsonDecode(res);
|
||||||
|
totalPoints =
|
||||||
|
walletDriverPointsDate['message'][0]['total_amount'].toString();
|
||||||
|
isLoading = false;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
late String paymentID;
|
||||||
|
Future addDriverPayment(String paymentMethod, amount) async {
|
||||||
|
var res = await CRUD().post(link: AppLink.addDriverPaymentPoints, payload: {
|
||||||
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
|
'amount': amount.toString(),
|
||||||
|
'payment_method': paymentMethod.toString(),
|
||||||
|
});
|
||||||
|
var d = jsonDecode(res);
|
||||||
|
paymentID = d['message'].toString();
|
||||||
|
// print(paymentID);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future addDriverWallet(String paymentMethod, point) async {
|
||||||
|
await CRUD().post(link: AppLink.addDriversWallet, payload: {
|
||||||
|
'driverID': box.read(BoxName.driverID).toString(),
|
||||||
|
'paymentID': paymentID.toString(),
|
||||||
|
'amount': point,
|
||||||
|
'paymentMethod': paymentMethod.toString(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
getCaptainWalletFromRide();
|
||||||
|
getCaptainWalletFromBuyPoints();
|
||||||
|
super.onInit();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -19,11 +19,6 @@ class CreditCardController extends GetxController {
|
|||||||
String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
||||||
String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
||||||
|
|
||||||
print('cardNumber: $cardNumber');
|
|
||||||
print('cardHolderName: $cardHolderName');
|
|
||||||
print('expiryDate: $expiryDate');
|
|
||||||
print('cvvCode: $cvvCode');
|
|
||||||
|
|
||||||
if (cvvCode != null && cvvCode.isNotEmpty) {
|
if (cvvCode != null && cvvCode.isNotEmpty) {
|
||||||
final maskedCardNumber = DigitObscuringFormatter()
|
final maskedCardNumber = DigitObscuringFormatter()
|
||||||
.formatEditUpdate(
|
.formatEditUpdate(
|
||||||
@@ -32,8 +27,6 @@ class CreditCardController extends GetxController {
|
|||||||
)
|
)
|
||||||
.text;
|
.text;
|
||||||
|
|
||||||
print('maskedCardNumber: $maskedCardNumber');
|
|
||||||
|
|
||||||
cardNumberController.text = maskedCardNumber;
|
cardNumberController.text = maskedCardNumber;
|
||||||
cardHolderNameController.text = cardHolderName ?? '';
|
cardHolderNameController.text = cardHolderName ?? '';
|
||||||
expiryDateController.text = expiryDate ?? '';
|
expiryDateController.text = expiryDate ?? '';
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'package:flutter_paypal/flutter_paypal.dart';
|
|||||||
import 'package:flutter_stripe/flutter_stripe.dart';
|
import 'package:flutter_stripe/flutter_stripe.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:local_auth/local_auth.dart';
|
import 'package:local_auth/local_auth.dart';
|
||||||
import 'package:ride/constant/credential.dart';
|
|
||||||
import 'package:ride/controller/home/map_passenger_controller.dart';
|
import 'package:ride/controller/home/map_passenger_controller.dart';
|
||||||
|
|
||||||
import '../../constant/box_name.dart';
|
import '../../constant/box_name.dart';
|
||||||
@@ -53,16 +52,51 @@ class PaymentController extends GetxController {
|
|||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void onChangedPaymentMethodWallet(bool? value) {
|
addPassengerWallet() async {
|
||||||
isWalletChecked = !isWalletChecked;
|
isLoading = true;
|
||||||
isWalletChecked ? isCashChecked = false : isCashChecked = true;
|
update();
|
||||||
|
// double sallaryAccountNowBeforeAdding =
|
||||||
|
// double.parse(box.read(BoxName.passengerWalletTotal).toString());
|
||||||
|
await CRUD().post(link: AppLink.addPassengersWallet, payload: {
|
||||||
|
'passenger_id': box.read(BoxName.passengerID).toString(),
|
||||||
|
'balance': selectedAmount.toString()
|
||||||
|
}).then((value) {
|
||||||
|
getPassengerWallet();
|
||||||
|
// sallaryAccountNowBeforeAdding = sallaryAccountNowBeforeAdding +
|
||||||
|
// double.parse(selectedAmount.toString());
|
||||||
|
// box.write(BoxName.passengerWalletTotal, sallaryAccountNowBeforeAdding);
|
||||||
|
});
|
||||||
|
|
||||||
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void onChangedPaymentMethodWallet(bool? value) {
|
||||||
|
if (box.read(BoxName.passengerWalletTotal) == null ||
|
||||||
|
double.parse(box.read(BoxName.passengerWalletTotal).toString()) <
|
||||||
|
totalPassenger) {
|
||||||
|
isWalletChecked = false;
|
||||||
|
isWalletChecked ? isCashChecked = true : isCashChecked = true;
|
||||||
|
update();
|
||||||
|
} else {
|
||||||
|
isWalletChecked = !isWalletChecked;
|
||||||
|
isWalletChecked ? isCashChecked = false : isCashChecked = true;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void onChangedPaymentMethodCash(bool? value) {
|
void onChangedPaymentMethodCash(bool? value) {
|
||||||
isCashChecked = !isCashChecked;
|
if (box.read(BoxName.passengerWalletTotal) == null ||
|
||||||
isCashChecked ? isWalletChecked = false : isWalletChecked = true;
|
double.parse(box.read(BoxName.passengerWalletTotal)) < totalPassenger) {
|
||||||
update();
|
isWalletChecked = false;
|
||||||
|
isCashChecked = !isCashChecked;
|
||||||
|
isCashChecked ? isWalletChecked = false : isWalletChecked = false;
|
||||||
|
update();
|
||||||
|
} else {
|
||||||
|
isCashChecked = !isCashChecked;
|
||||||
|
isCashChecked ? isWalletChecked = false : isWalletChecked = true;
|
||||||
|
update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyPromoCodeToPassenger() async {
|
void applyPromoCodeToPassenger() async {
|
||||||
@@ -120,6 +154,72 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> initializePaymentSheet(String clientSecret) async {
|
||||||
|
await Stripe.instance.initPaymentSheet(
|
||||||
|
paymentSheetParameters: SetupPaymentSheetParameters(
|
||||||
|
// intentConfiguration: IntentConfiguration.fromJson({}),
|
||||||
|
// applePay: const PaymentSheetApplePay(merchantCountryCode: 'US'),
|
||||||
|
// googlePay: const PaymentSheetGooglePay(merchantCountryCode: 'US'),
|
||||||
|
paymentIntentClientSecret: clientSecret,
|
||||||
|
merchantDisplayName: 'Sefer',
|
||||||
|
billingDetails: BillingDetails(
|
||||||
|
name: box.read(BoxName.nameDriver) == null
|
||||||
|
? box.read(BoxName.name).toString()
|
||||||
|
: box.read(BoxName.nameDriver).toString(),
|
||||||
|
email: box.read(BoxName.emailDriver) == null
|
||||||
|
? box.read(BoxName.email).toString()
|
||||||
|
: box.read(BoxName.emailDriver).toString(),
|
||||||
|
phone: box.read(BoxName.phoneDriver) == null
|
||||||
|
? box.read(BoxName.phone).toString()
|
||||||
|
: box.read(BoxName.phoneDriver).toString(),
|
||||||
|
address: const Address(
|
||||||
|
city: 'city',
|
||||||
|
country: 'United States',
|
||||||
|
line1: '',
|
||||||
|
line2: '',
|
||||||
|
postalCode: '12345',
|
||||||
|
state: 'Boston')),
|
||||||
|
allowsDelayedPaymentMethods: true,
|
||||||
|
customerEphemeralKeySecret: Stripe.merchantIdentifier,
|
||||||
|
appearance: const PaymentSheetAppearance(
|
||||||
|
shapes: PaymentSheetShape(borderRadius: 12),
|
||||||
|
colors: PaymentSheetAppearanceColors(
|
||||||
|
background: AppColor.secondaryColor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
billingDetailsCollectionConfiguration:
|
||||||
|
const BillingDetailsCollectionConfiguration(
|
||||||
|
name: CollectionMode.always,
|
||||||
|
phone: CollectionMode.always,
|
||||||
|
email: CollectionMode.always,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> getClientSecret(String amount, currency) async {
|
||||||
|
var res = await CRUD().postStripe(
|
||||||
|
link: 'https://api.stripe.com/v1/payment_intents',
|
||||||
|
payload: {'amount': amount, 'currency': currency},
|
||||||
|
);
|
||||||
|
|
||||||
|
// Convert the res object to a JSON object
|
||||||
|
final jsonResponse = jsonDecode(res);
|
||||||
|
print(jsonResponse);
|
||||||
|
// Check if the client_secret property exists and is not null
|
||||||
|
if (jsonResponse.containsKey('client_secret') &&
|
||||||
|
jsonResponse['client_secret'] != null) {
|
||||||
|
// Return the client_secret property
|
||||||
|
return jsonResponse['client_secret'] as String;
|
||||||
|
} else {
|
||||||
|
throw Exception('Failed to fetch client secret');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> configure3dSecureFuture() async {
|
||||||
|
await Stripe.instance.openApplePaySetup();
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> makePaymentPayPal(BuildContext context) async {
|
Future<void> makePaymentPayPal(BuildContext context) async {
|
||||||
try {
|
try {
|
||||||
// Check if local authentication is available
|
// Check if local authentication is available
|
||||||
@@ -189,12 +289,7 @@ class PaymentController extends GetxController {
|
|||||||
note: "Contact us for any questions on your order.",
|
note: "Contact us for any questions on your order.",
|
||||||
onSuccess: (Map params) async {
|
onSuccess: (Map params) async {
|
||||||
print("onSuccess: $params");
|
print("onSuccess: $params");
|
||||||
await CRUD()
|
addPassengerWallet();
|
||||||
.post(link: AppLink.addPassengersWallet, payload: {
|
|
||||||
'passenger_id':
|
|
||||||
box.read(BoxName.passengerID).toString(),
|
|
||||||
'balance': selectedAmount.toString()
|
|
||||||
});
|
|
||||||
changePromoSheetDialogue();
|
changePromoSheetDialogue();
|
||||||
await getPassengerWallet();
|
await getPassengerWallet();
|
||||||
},
|
},
|
||||||
@@ -223,44 +318,6 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initializePaymentSheet(String clientSecret) async {
|
|
||||||
await Stripe.instance.initPaymentSheet(
|
|
||||||
paymentSheetParameters: SetupPaymentSheetParameters(
|
|
||||||
paymentIntentClientSecret: clientSecret,
|
|
||||||
merchantDisplayName: 'Sefer',
|
|
||||||
billingDetails: BillingDetails(
|
|
||||||
name: box.read(BoxName.nameDriver).toString(),
|
|
||||||
email: box.read(BoxName.emailDriver).toString(),
|
|
||||||
phone: box.read(BoxName.phoneDriver).toString(),
|
|
||||||
),
|
|
||||||
billingDetailsCollectionConfiguration:
|
|
||||||
const BillingDetailsCollectionConfiguration(
|
|
||||||
name: CollectionMode.always,
|
|
||||||
phone: CollectionMode.always,
|
|
||||||
email: CollectionMode.always,
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<String> getClientSecret(String amount, currency) async {
|
|
||||||
var res = await CRUD().postStripe(
|
|
||||||
link: 'https://api.stripe.com/v1/payment_intents',
|
|
||||||
payload: {'amount': amount, 'currency': currency},
|
|
||||||
);
|
|
||||||
|
|
||||||
// Convert the res object to a JSON object
|
|
||||||
final jsonResponse = jsonDecode(res);
|
|
||||||
print(jsonResponse);
|
|
||||||
// Check if the client_secret property exists and is not null
|
|
||||||
if (jsonResponse.containsKey('client_secret') &&
|
|
||||||
jsonResponse['client_secret'] != null) {
|
|
||||||
// Return the client_secret property
|
|
||||||
return jsonResponse['client_secret'] as String;
|
|
||||||
} else {
|
|
||||||
throw Exception('Failed to fetch client secret');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
getPassengerWallet();
|
getPassengerWallet();
|
||||||
|
|||||||
41
lib/controller/profile/captain_profile_controller.dart
Normal file
41
lib/controller/profile/captain_profile_controller.dart
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/box_name.dart';
|
||||||
|
import 'package:ride/constant/links.dart';
|
||||||
|
import 'package:ride/controller/functions/crud.dart';
|
||||||
|
import 'package:ride/main.dart';
|
||||||
|
|
||||||
|
class CaptainProfileController extends GetxController {
|
||||||
|
bool isLoading = false;
|
||||||
|
TextEditingController vin = TextEditingController();
|
||||||
|
TextEditingController color = TextEditingController();
|
||||||
|
TextEditingController make = TextEditingController();
|
||||||
|
TextEditingController model = TextEditingController();
|
||||||
|
TextEditingController year = TextEditingController();
|
||||||
|
TextEditingController expirationDate = TextEditingController();
|
||||||
|
|
||||||
|
Future updateFields() async {
|
||||||
|
var res = await CRUD().post(link: AppLink.updateRegisrationCar, payload: {
|
||||||
|
'driverID': box.read(BoxName.driverID),
|
||||||
|
'vin': vin.text,
|
||||||
|
'color': color.text,
|
||||||
|
'model': model.text,
|
||||||
|
'make': make.text,
|
||||||
|
'year': year.text,
|
||||||
|
'expirationDate': expirationDate.text,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (jsonDecode(res)['status'] == 'success') {
|
||||||
|
box.write(BoxName.vin, vin.text);
|
||||||
|
box.write(BoxName.color, color.text);
|
||||||
|
box.write(BoxName.model, model.text);
|
||||||
|
box.write(BoxName.make, make.text);
|
||||||
|
box.write(BoxName.year, year.text);
|
||||||
|
box.write(BoxName.expirationDate, expirationDate.text);
|
||||||
|
|
||||||
|
Get.back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -21,7 +21,8 @@ class DbSql {
|
|||||||
path,
|
path,
|
||||||
version: 1,
|
version: 1,
|
||||||
onCreate: (db, version) async {
|
onCreate: (db, version) async {
|
||||||
await db.execute('''
|
await db.execute(
|
||||||
|
'''
|
||||||
CREATE TABLE IF NOT EXISTS ${TableName.carLocations}(
|
CREATE TABLE IF NOT EXISTS ${TableName.carLocations}(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
driver_id TEXT,
|
driver_id TEXT,
|
||||||
@@ -31,7 +32,8 @@ class DbSql {
|
|||||||
updated_at TEXT
|
updated_at TEXT
|
||||||
)
|
)
|
||||||
''');
|
''');
|
||||||
await db.execute('''
|
await db.execute(
|
||||||
|
'''
|
||||||
CREATE TABLE IF NOT EXISTS ${TableName.placesFavorite}(
|
CREATE TABLE IF NOT EXISTS ${TableName.placesFavorite}(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
latitude REAL,
|
latitude REAL,
|
||||||
@@ -40,7 +42,8 @@ class DbSql {
|
|||||||
rate TEXT
|
rate TEXT
|
||||||
)
|
)
|
||||||
''');
|
''');
|
||||||
await db.execute('''
|
await db.execute(
|
||||||
|
'''
|
||||||
CREATE TABLE IF NOT EXISTS ${TableName.driverOrdersRefuse}(
|
CREATE TABLE IF NOT EXISTS ${TableName.driverOrdersRefuse}(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
order_id TEXT,
|
order_id TEXT,
|
||||||
@@ -48,12 +51,20 @@ class DbSql {
|
|||||||
driver_id TEXT
|
driver_id TEXT
|
||||||
)
|
)
|
||||||
''');
|
''');
|
||||||
await db.execute('''
|
await db.execute(
|
||||||
|
'''
|
||||||
CREATE TABLE IF NOT EXISTS ${TableName.faceDetectTimes}(
|
CREATE TABLE IF NOT EXISTS ${TableName.faceDetectTimes}(
|
||||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
faceDetectTimes INTEGER
|
faceDetectTimes INTEGER
|
||||||
)
|
)
|
||||||
''');
|
''');
|
||||||
|
await db.execute(
|
||||||
|
'''
|
||||||
|
CREATE TABLE IF NOT EXISTS ${TableName.captainNotification}(
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||||
|
faceDetectTimes INTEGER
|
||||||
|
)
|
||||||
|
''');
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||||
import 'package:geolocator/geolocator.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/colors.dart';
|
import 'package:ride/constant/colors.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/colors.dart';
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/links.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
import 'package:ride/constant/table_names.dart';
|
import 'package:ride/constant/table_names.dart';
|
||||||
|
import 'package:ride/controller/auth/captin/register_captin_controller.dart';
|
||||||
import 'package:ride/controller/functions/ocr_controller.dart';
|
import 'package:ride/controller/functions/ocr_controller.dart';
|
||||||
import 'package:ride/main.dart';
|
import 'package:ride/main.dart';
|
||||||
import 'package:ride/views/auth/captin/car_license_page.dart';
|
import 'package:ride/views/auth/captin/car_license_page.dart';
|
||||||
@@ -12,8 +16,9 @@ import 'package:ride/views/widgets/mycircular.dart';
|
|||||||
|
|
||||||
class AiPage extends StatelessWidget {
|
class AiPage extends StatelessWidget {
|
||||||
ScanDocumentsByApi scanDocumentsByApi = Get.put(ScanDocumentsByApi());
|
ScanDocumentsByApi scanDocumentsByApi = Get.put(ScanDocumentsByApi());
|
||||||
|
RegisterCaptainController registerCaptainController =
|
||||||
|
Get.put(RegisterCaptainController());
|
||||||
|
|
||||||
AiPage({super.key});
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
@@ -198,8 +203,14 @@ class AiPage extends StatelessWidget {
|
|||||||
.toString() ==
|
.toString() ==
|
||||||
'Same'
|
'Same'
|
||||||
? MyElevatedButton(
|
? MyElevatedButton(
|
||||||
onPressed: () =>
|
onPressed: () async {
|
||||||
Get.to(() => CarLicensePage()),
|
await registerCaptainController
|
||||||
|
.register();
|
||||||
|
await registerCaptainController
|
||||||
|
.addLisence();
|
||||||
|
// await scanDocumentsByApi
|
||||||
|
// .uploadImagePortrate();
|
||||||
|
},
|
||||||
title:
|
title:
|
||||||
'Go to next step\nscan Car License.'
|
'Go to next step\nscan Car License.'
|
||||||
.tr,
|
.tr,
|
||||||
|
|||||||
@@ -2,10 +2,8 @@ import 'dart:io';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/api_key.dart';
|
import 'package:ride/controller/functions/ocr_controller.dart';
|
||||||
import 'package:ride/env/env.dart';
|
|
||||||
|
|
||||||
import '../../../constant/box_name.dart';
|
|
||||||
import '../../../constant/style.dart';
|
import '../../../constant/style.dart';
|
||||||
import '../../../controller/auth/captin/ml_google_doc.dart';
|
import '../../../controller/auth/captin/ml_google_doc.dart';
|
||||||
import '../../../controller/auth/captin/register_captin_controller.dart';
|
import '../../../controller/auth/captin/register_captin_controller.dart';
|
||||||
@@ -21,6 +19,7 @@ class CarLicensePage extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
Get.find<ScanDocumentsByApi>().uploadImagePortrate();
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Car License Card'.tr,
|
title: 'Car License Card'.tr,
|
||||||
body: [
|
body: [
|
||||||
@@ -42,19 +41,20 @@ class CarLicensePage extends StatelessWidget {
|
|||||||
Positioned(
|
Positioned(
|
||||||
top: 50,
|
top: 50,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: Get.height * .7,
|
height: Get.height * .6,
|
||||||
width: Get.width,
|
width: Get.width,
|
||||||
child: buildImageWithBoundingBoxes(),
|
child: buildImageWithBoundingBoxes(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 20,
|
bottom: Get.height * .2,
|
||||||
left: Get.width * .2,
|
left: Get.width * .2,
|
||||||
right: Get.width * .2,
|
right: Get.width * .2,
|
||||||
child: MyElevatedButton(
|
child: MyElevatedButton(
|
||||||
title: 'Register'.tr,
|
title: 'Register'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
registerCaptainController.addLisence();
|
// registerCaptainController.addLisence();
|
||||||
|
// registerCaptainController.register();
|
||||||
registerCaptainController.addRegisrationCarForDriver(
|
registerCaptainController.addRegisrationCarForDriver(
|
||||||
carRegistrationRecognizerController.extracted['vin'],
|
carRegistrationRecognizerController.extracted['vin'],
|
||||||
carRegistrationRecognizerController.extracted['make'],
|
carRegistrationRecognizerController.extracted['make'],
|
||||||
@@ -67,7 +67,6 @@ class CarLicensePage extends StatelessWidget {
|
|||||||
carRegistrationRecognizerController
|
carRegistrationRecognizerController
|
||||||
.extracted['registration_date'],
|
.extracted['registration_date'],
|
||||||
);
|
);
|
||||||
registerCaptainController.register();
|
|
||||||
},
|
},
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -148,10 +148,13 @@ class LoginCaptin extends StatelessWidget {
|
|||||||
'Please enter your phone number.'.tr,
|
'Please enter your phone number.'.tr,
|
||||||
),
|
),
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value!.isEmpty ||
|
if (value!.isEmpty) {
|
||||||
(value.length > 6)) {
|
|
||||||
return 'Please enter Your Password.'.tr;
|
return 'Please enter Your Password.'.tr;
|
||||||
}
|
}
|
||||||
|
if (value.length < 6) {
|
||||||
|
return 'Password must br at least 6 character.'
|
||||||
|
.tr;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -261,88 +264,91 @@ class LoginCaptin extends StatelessWidget {
|
|||||||
Padding agreedPage() {
|
Padding agreedPage() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
children: [
|
child: Column(
|
||||||
Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
Image.asset(
|
|
||||||
'assets/images/notepad.png',
|
|
||||||
width: Get.width * .2,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: Get.width * .7,
|
|
||||||
child: Text(
|
|
||||||
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
|
|
||||||
style: AppStyle.headtitle2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 30,
|
|
||||||
),
|
|
||||||
RichText(
|
|
||||||
text: TextSpan(
|
|
||||||
text:
|
|
||||||
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ',
|
|
||||||
style: AppStyle.title,
|
|
||||||
children: <TextSpan>[
|
|
||||||
TextSpan(
|
|
||||||
text: 'Privacy Notice',
|
|
||||||
style: const TextStyle(
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
color: AppColor.blueColor),
|
|
||||||
recognizer: TapGestureRecognizer()
|
|
||||||
..onTap = () {
|
|
||||||
Get.defaultDialog(
|
|
||||||
title: ''.tr,
|
|
||||||
content: const SizedBox(
|
|
||||||
height: 400,
|
|
||||||
width: 400,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: HtmlWidget(AppInformation.privacyPolicy),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}),
|
|
||||||
const TextSpan(
|
|
||||||
text: '. I am at least 18 years of age.',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 100,
|
|
||||||
),
|
|
||||||
GetBuilder<LoginController>(
|
|
||||||
builder: (controller) => Column(
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Image.asset(
|
||||||
children: [
|
'assets/images/notepad.png',
|
||||||
Checkbox.adaptive(
|
width: Get.width * .2,
|
||||||
autofocus: true,
|
),
|
||||||
tristate: true,
|
SizedBox(
|
||||||
splashRadius: 25,
|
width: Get.width * .7,
|
||||||
activeColor: AppColor.primaryColor,
|
child: Text(
|
||||||
value: controller.isAgreeTerms,
|
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
|
||||||
onChanged: (value) => controller.changeAgreeTerm(),
|
style: AppStyle.headtitle2,
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
'I Agree'.tr,
|
|
||||||
style: controller.isAgreeTerms
|
|
||||||
? AppStyle.title
|
|
||||||
: AppStyle.title
|
|
||||||
.copyWith(color: AppColor.accentColor),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Submit'.tr,
|
|
||||||
onPressed: () => controller.saveAgreementTerms()),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
const SizedBox(
|
||||||
],
|
height: 30,
|
||||||
|
),
|
||||||
|
RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text:
|
||||||
|
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ',
|
||||||
|
style: AppStyle.title,
|
||||||
|
children: <TextSpan>[
|
||||||
|
TextSpan(
|
||||||
|
text: 'Privacy Notice',
|
||||||
|
style: const TextStyle(
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
color: AppColor.blueColor),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: ''.tr,
|
||||||
|
content: const SizedBox(
|
||||||
|
height: 400,
|
||||||
|
width: 400,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child:
|
||||||
|
HtmlWidget(AppInformation.privacyPolicy),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}),
|
||||||
|
const TextSpan(
|
||||||
|
text: '. I am at least 18 years of age.',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 100,
|
||||||
|
),
|
||||||
|
GetBuilder<LoginController>(
|
||||||
|
builder: (controller) => Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox.adaptive(
|
||||||
|
autofocus: true,
|
||||||
|
tristate: true,
|
||||||
|
splashRadius: 25,
|
||||||
|
activeColor: AppColor.primaryColor,
|
||||||
|
value: controller.isAgreeTerms,
|
||||||
|
onChanged: (value) => controller.changeAgreeTerm(),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'I Agree'.tr,
|
||||||
|
style: controller.isAgreeTerms
|
||||||
|
? AppStyle.title
|
||||||
|
: AppStyle.title
|
||||||
|
.copyWith(color: AppColor.accentColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Submit'.tr,
|
||||||
|
onPressed: () => controller.saveAgreementTerms()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -250,11 +250,11 @@ class RegisterCaptin extends StatelessWidget {
|
|||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'Next'.tr,
|
title: 'Next'.tr,
|
||||||
onPressed: () => controller.nextToAIDetection()),
|
onPressed: () => controller.nextToAIDetection()),
|
||||||
MyElevatedButton(
|
// MyElevatedButton(
|
||||||
//todo remove it for test
|
// //todo remove it for test
|
||||||
title: 'Car registration ai '.tr,
|
// title: 'Car registration ai '.tr,
|
||||||
kolor: AppColor.blueColor,
|
// kolor: AppColor.blueColor,
|
||||||
onPressed: () => Get.to(() => CarLicensePage())),
|
// onPressed: () => Get.to(() => CarLicensePage())),
|
||||||
|
|
||||||
// controller.isloading
|
// controller.isloading
|
||||||
// ? const MyCircularProgressIndicator()
|
// ? const MyCircularProgressIndicator()
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
import 'package:animated_text_kit/animated_text_kit.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:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/constant/colors.dart';
|
import 'package:ride/constant/colors.dart';
|
||||||
@@ -9,6 +11,7 @@ import 'package:ride/views/auth/captin/login_captin.dart';
|
|||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
import 'package:ride/views/widgets/my_scafold.dart';
|
||||||
|
|
||||||
|
import '../../constant/info.dart';
|
||||||
import '../../controller/auth/login_controller.dart';
|
import '../../controller/auth/login_controller.dart';
|
||||||
import '../widgets/mycircular.dart';
|
import '../widgets/mycircular.dart';
|
||||||
import 'register_page.dart';
|
import 'register_page.dart';
|
||||||
@@ -138,10 +141,13 @@ class LoginPage extends StatelessWidget {
|
|||||||
'Please enter your phone number.'.tr,
|
'Please enter your phone number.'.tr,
|
||||||
),
|
),
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value!.isEmpty ||
|
if (value!.isEmpty) {
|
||||||
(value.length > 6)) {
|
|
||||||
return 'Please enter Your Password.'.tr;
|
return 'Please enter Your Password.'.tr;
|
||||||
}
|
}
|
||||||
|
if (value.length < 6) {
|
||||||
|
return 'Password must br at least 6 character.'
|
||||||
|
.tr;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -202,64 +208,91 @@ class LoginPage extends StatelessWidget {
|
|||||||
Padding agreedPage() {
|
Padding agreedPage() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
children: [
|
child: Column(
|
||||||
Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
Image.asset(
|
|
||||||
'assets/images/notepad.png',
|
|
||||||
width: Get.width * .2,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: Get.width * .7,
|
|
||||||
child: Text(
|
|
||||||
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
|
|
||||||
style: AppStyle.headtitle2,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 30,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the Privacy Notice. I am at least 18 years of age.'
|
|
||||||
.tr,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
const SizedBox(
|
|
||||||
height: 100,
|
|
||||||
),
|
|
||||||
GetBuilder<LoginController>(
|
|
||||||
builder: (controller) => Column(
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Image.asset(
|
||||||
children: [
|
'assets/images/notepad.png',
|
||||||
Checkbox.adaptive(
|
width: Get.width * .2,
|
||||||
autofocus: true,
|
),
|
||||||
tristate: true,
|
SizedBox(
|
||||||
splashRadius: 25,
|
width: Get.width * .7,
|
||||||
activeColor: AppColor.primaryColor,
|
child: Text(
|
||||||
value: controller.isAgreeTerms,
|
'Accept Ride\'s Terms & Review Privacy Notice'.tr,
|
||||||
onChanged: (value) => controller.changeAgreeTerm(),
|
style: AppStyle.headtitle2,
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
'I Agree'.tr,
|
|
||||||
style: controller.isAgreeTerms
|
|
||||||
? AppStyle.title
|
|
||||||
: AppStyle.title
|
|
||||||
.copyWith(color: AppColor.accentColor),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Submit'.tr,
|
|
||||||
onPressed: () => controller.saveAgreementTerms())
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
const SizedBox(
|
||||||
],
|
height: 30,
|
||||||
|
),
|
||||||
|
RichText(
|
||||||
|
text: TextSpan(
|
||||||
|
text:
|
||||||
|
'By selecting "I Agree" below, I have reviewed and agree to the Terms of Use and acknowledge the ',
|
||||||
|
style: AppStyle.title,
|
||||||
|
children: <TextSpan>[
|
||||||
|
TextSpan(
|
||||||
|
text: 'Privacy Notice',
|
||||||
|
style: const TextStyle(
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
color: AppColor.blueColor),
|
||||||
|
recognizer: TapGestureRecognizer()
|
||||||
|
..onTap = () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: ''.tr,
|
||||||
|
content: const SizedBox(
|
||||||
|
height: 400,
|
||||||
|
width: 400,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child:
|
||||||
|
HtmlWidget(AppInformation.privacyPolicy),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
}),
|
||||||
|
const TextSpan(
|
||||||
|
text: '. I am at least 18 years of age.',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(
|
||||||
|
height: 100,
|
||||||
|
),
|
||||||
|
GetBuilder<LoginController>(
|
||||||
|
builder: (controller) => Column(
|
||||||
|
children: [
|
||||||
|
Row(
|
||||||
|
children: [
|
||||||
|
Checkbox.adaptive(
|
||||||
|
autofocus: true,
|
||||||
|
tristate: true,
|
||||||
|
splashRadius: 25,
|
||||||
|
activeColor: AppColor.primaryColor,
|
||||||
|
value: controller.isAgreeTerms,
|
||||||
|
onChanged: (value) => controller.changeAgreeTerm(),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'I Agree'.tr,
|
||||||
|
style: controller.isAgreeTerms
|
||||||
|
? AppStyle.title
|
||||||
|
: AppStyle.title
|
||||||
|
.copyWith(color: AppColor.accentColor),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Submit'.tr,
|
||||||
|
onPressed: () => controller.saveAgreementTerms()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,9 +156,13 @@ class RegisterPage extends StatelessWidget {
|
|||||||
hintText: 'Enter your Password'.tr,
|
hintText: 'Enter your Password'.tr,
|
||||||
),
|
),
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value!.isEmpty || (value.length > 6)) {
|
if (value!.isEmpty) {
|
||||||
return 'Please enter Your Password.'.tr;
|
return 'Please enter Your Password.'.tr;
|
||||||
}
|
}
|
||||||
|
if (value.length < 6) {
|
||||||
|
return 'Password must br at least 6 character.'
|
||||||
|
.tr;
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/colors.dart';
|
|
||||||
import 'package:ride/constant/style.dart';
|
import '../../../../constant/colors.dart';
|
||||||
import 'package:ride/controller/auth/captin/history_captain.dart';
|
import '../../../../constant/style.dart';
|
||||||
import 'package:ride/views/home/Captin/history/history_details_page.dart';
|
import '../../../../controller/auth/captin/history_captain.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import '../../../widgets/elevated_btn.dart';
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
import '../../../widgets/my_scafold.dart';
|
||||||
import 'package:ride/views/widgets/mycircular.dart';
|
import '../../../widgets/mycircular.dart';
|
||||||
|
|
||||||
class HistoryCaptain extends StatelessWidget {
|
class HistoryCaptain extends StatelessWidget {
|
||||||
const HistoryCaptain({super.key});
|
const HistoryCaptain({super.key});
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ class DrawerCaptain extends StatelessWidget {
|
|||||||
title: const Text('Wallet'),
|
title: const Text('Wallet'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Handle wallet item tap
|
// Handle wallet item tap
|
||||||
Get.to(() => const WaletCaptain(), transition: Transition.native);
|
Get.to(() => WaletCaptain(), transition: Transition.native);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
@@ -76,7 +76,7 @@ class DrawerCaptain extends StatelessWidget {
|
|||||||
title: const Text('Helping Center'),
|
title: const Text('Helping Center'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// Handle helping center item tap
|
// Handle helping center item tap
|
||||||
Get.to(() => const HelpCaptain(), transition: Transition.size);
|
Get.to(() => HelpCaptain(), transition: Transition.size);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
|||||||
@@ -1,15 +1,155 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/home/captin/help/help_controller.dart';
|
||||||
|
import 'package:ride/views/home/Captin/home_captain/help_details_replay_page.dart';
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
import 'package:ride/views/widgets/my_scafold.dart';
|
||||||
|
|
||||||
|
import '../../../widgets/elevated_btn.dart';
|
||||||
|
import '../../../widgets/mycircular.dart';
|
||||||
|
|
||||||
class HelpCaptain extends StatelessWidget {
|
class HelpCaptain extends StatelessWidget {
|
||||||
const HelpCaptain({super.key});
|
HelpCaptain({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
Get.put(HelpController());
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Helping Page'.tr,
|
title: 'Helping Page'.tr,
|
||||||
body: [],
|
body: [
|
||||||
|
Positioned(
|
||||||
|
top: Get.height * .025,
|
||||||
|
right: 20,
|
||||||
|
left: 20,
|
||||||
|
child: Card(
|
||||||
|
color: AppColor.yellowColor,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
'If you need any help or have question this is right site to do that and your welcome'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
top: Get.height * .15,
|
||||||
|
right: 20,
|
||||||
|
left: 20,
|
||||||
|
child: Card(
|
||||||
|
elevation: 3,
|
||||||
|
color: AppColor.secondaryColor,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: GetBuilder<HelpController>(
|
||||||
|
builder: (helpController) => Form(
|
||||||
|
key: helpController.formKey,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
TextFormField(
|
||||||
|
controller: helpController.helpQuestionController,
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
hintText: 'Enter your Question here',
|
||||||
|
labelText: 'Question',
|
||||||
|
),
|
||||||
|
validator: (value) {
|
||||||
|
if (value == null || value.isEmpty) {
|
||||||
|
return 'Please enter your Question.';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
const SizedBox(height: 20),
|
||||||
|
helpController.isLoading
|
||||||
|
? const MyCircularProgressIndicator()
|
||||||
|
: MyElevatedButton(
|
||||||
|
onPressed: () {
|
||||||
|
if (helpController.formKey.currentState!
|
||||||
|
.validate()) {
|
||||||
|
helpController.addHelpQuestion();
|
||||||
|
|
||||||
|
// Clear the feedback form
|
||||||
|
helpController.formKey.currentState!
|
||||||
|
.reset();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
title: 'Submit Question'.tr,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 3,
|
||||||
|
right: 8,
|
||||||
|
left: 8,
|
||||||
|
child: GetBuilder<HelpController>(
|
||||||
|
builder: (helpController) => Container(
|
||||||
|
height: Get.height * .63,
|
||||||
|
decoration: AppStyle.boxDecoration,
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount:
|
||||||
|
helpController.helpQuestionDate['message'].length,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
var list =
|
||||||
|
helpController.helpQuestionDate['message'][index];
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(3),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: AppColor.greenColor,
|
||||||
|
width: 3,
|
||||||
|
),
|
||||||
|
borderRadius: BorderRadius.circular(11)),
|
||||||
|
// elevation: 3,
|
||||||
|
// color: AppColor.greenColor,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
print(list['id']);
|
||||||
|
helpController.getindex(
|
||||||
|
list['id'], list['helpQuestion']);
|
||||||
|
helpController
|
||||||
|
.getHelpRepley(list['id'].toString());
|
||||||
|
Get.to(
|
||||||
|
() => const HelpDetailsReplayPage(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(2),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .6,
|
||||||
|
child: Text(
|
||||||
|
list['helpQuestion'],
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .3,
|
||||||
|
child: Text(
|
||||||
|
list['datecreated'],
|
||||||
|
style: AppStyle.subtitle,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
)
|
||||||
|
],
|
||||||
isleading: true,
|
isleading: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,83 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
|
import '../../../../controller/home/captin/help/help_controller.dart';
|
||||||
|
import '../../../widgets/my_scafold.dart';
|
||||||
|
|
||||||
|
class HelpDetailsReplayPage extends StatelessWidget {
|
||||||
|
const HelpDetailsReplayPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
Get.find<HelpController>();
|
||||||
|
return GetBuilder<HelpController>(
|
||||||
|
builder: (helpController) => MyScafolld(
|
||||||
|
title: 'Help Details'.tr,
|
||||||
|
body: [
|
||||||
|
helpController.isLoading
|
||||||
|
? const MyCircularProgressIndicator()
|
||||||
|
: Column(
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Card(
|
||||||
|
elevation: 3,
|
||||||
|
child: Container(
|
||||||
|
width: Get.width * .66,
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Text(
|
||||||
|
helpController.qustion,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Card(
|
||||||
|
elevation: 3,
|
||||||
|
child: Container(
|
||||||
|
color: Colors.transparent,
|
||||||
|
width: Get.width * .66,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: helpController.status ==
|
||||||
|
'not yet' ||
|
||||||
|
helpController
|
||||||
|
.helpQuestionRepleyDate[
|
||||||
|
'message']['replay']
|
||||||
|
.toString() ==
|
||||||
|
'not yet'
|
||||||
|
? Text(
|
||||||
|
'No Response yet.'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
)
|
||||||
|
: Text(
|
||||||
|
helpController
|
||||||
|
.helpQuestionRepleyDate[
|
||||||
|
'message']['replay']
|
||||||
|
.toString(),
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
isleading: true,
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,8 +15,6 @@ import '../../../../controller/home/captin/widget/connect.dart';
|
|||||||
import '../../../../controller/home/captin/widget/left_menu_map_captain.dart';
|
import '../../../../controller/home/captin/widget/left_menu_map_captain.dart';
|
||||||
import '../../../../main.dart';
|
import '../../../../main.dart';
|
||||||
import '../../../widgets/circle_container.dart';
|
import '../../../widgets/circle_container.dart';
|
||||||
import '../../../widgets/elevated_btn.dart';
|
|
||||||
import '../text_scanner.dart';
|
|
||||||
|
|
||||||
class HomeCaptain extends StatelessWidget {
|
class HomeCaptain extends StatelessWidget {
|
||||||
HomeCaptain({super.key});
|
HomeCaptain({super.key});
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
? Stack(
|
? Stack(
|
||||||
children: [
|
children: [
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 6,
|
bottom: 50,
|
||||||
left: 8,
|
left: 8,
|
||||||
child: AnimatedContainer(
|
child: AnimatedContainer(
|
||||||
duration: const Duration(milliseconds: 300),
|
duration: const Duration(milliseconds: 300),
|
||||||
@@ -37,33 +37,35 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
DefaultTextStyle(
|
DefaultTextStyle(
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
child: AnimatedTextKit(
|
child: Text(
|
||||||
animatedTexts: [
|
'Go to passenger Location now'.tr,
|
||||||
ScaleAnimatedText(
|
style: AppStyle.title
|
||||||
'Go to passenger Location now'.tr,
|
.copyWith(color: AppColor.greenColor),
|
||||||
),
|
)
|
||||||
WavyAnimatedText(
|
// AnimatedTextKit(
|
||||||
'Go to passenger Location now'.tr),
|
// animatedTexts: [
|
||||||
FlickerAnimatedText(
|
// ScaleAnimatedText(
|
||||||
'Go to passenger Location now'.tr),
|
// 'Go to passenger Location now'.tr,
|
||||||
WavyAnimatedText(
|
// ),
|
||||||
'Go to passenger Location now'.tr),
|
// WavyAnimatedText(
|
||||||
],
|
// 'Go to passenger Location now'.tr),
|
||||||
isRepeatingAnimation: true,
|
// FlickerAnimatedText(
|
||||||
onTap: () {
|
// 'Go to passenger Location now'.tr),
|
||||||
// print("Tap Event");
|
// WavyAnimatedText(
|
||||||
},
|
// 'Go to passenger Location now'.tr),
|
||||||
),
|
// ],
|
||||||
),
|
// isRepeatingAnimation: true,
|
||||||
|
// onTap: () {
|
||||||
|
// // print("Tap Event");
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text('Duration of the Ride is '.tr,
|
Text('Duration of the Ride is '.tr,
|
||||||
style: AppStyle.title),
|
style: AppStyle.title),
|
||||||
Text(
|
Text('${controller.duration} ${'Minute'.tr}',
|
||||||
controller.duration.toString() +
|
|
||||||
' ' +
|
|
||||||
'Minute'.tr,
|
|
||||||
style: AppStyle.title),
|
style: AppStyle.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -72,7 +74,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
Text('Distance of the Ride is '.tr,
|
Text('Distance of the Ride is '.tr,
|
||||||
style: AppStyle.title),
|
style: AppStyle.title),
|
||||||
Text(
|
Text(
|
||||||
controller.distance.toString() + ' ' + 'KM'.tr,
|
'${controller.distance} ${'KM'.tr}',
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -107,8 +109,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
launchCommunication(
|
launchCommunication(
|
||||||
'whatsapp',
|
'whatsapp',
|
||||||
controller.phone.toString(),
|
controller.phone.toString(),
|
||||||
'Hello this is Captain'.tr +
|
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||||
' ${box.read(BoxName.nameDriver)}');
|
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.whatshot,
|
Icons.whatshot,
|
||||||
@@ -119,8 +120,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
launchCommunication(
|
launchCommunication(
|
||||||
'sms',
|
'sms',
|
||||||
controller.phone.toString(),
|
controller.phone.toString(),
|
||||||
'Hello this is Captain'.tr +
|
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||||
' ${box.read(BoxName.nameDriver)}');
|
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.sms_rounded,
|
Icons.sms_rounded,
|
||||||
@@ -131,8 +131,7 @@ class PassengerInfoWindow extends StatelessWidget {
|
|||||||
launchCommunication(
|
launchCommunication(
|
||||||
'email',
|
'email',
|
||||||
controller.phone.toString(),
|
controller.phone.toString(),
|
||||||
'Hello this is Captain'.tr +
|
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||||
' ${box.read(BoxName.nameDriver)}');
|
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.email,
|
Icons.email,
|
||||||
|
|||||||
@@ -204,7 +204,8 @@ class OrderRequestPage extends StatelessWidget {
|
|||||||
'driverId': myList[18].toString(),
|
'driverId': myList[18].toString(),
|
||||||
'durationOfRideValue': myList[19].toString(),
|
'durationOfRideValue': myList[19].toString(),
|
||||||
'paymentAmount': myList[3].toString(),
|
'paymentAmount': myList[3].toString(),
|
||||||
'paymentMethod': myList[13].toString(),
|
'paymentMethod':
|
||||||
|
myList[13].toString() == 'true' ? 'visa' : 'cash'
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class MapPagePassenger extends StatelessWidget {
|
|||||||
buttomSheetMapPage(),
|
buttomSheetMapPage(),
|
||||||
hexagonClipper(),
|
hexagonClipper(),
|
||||||
const CancelRidePageShow(),
|
const CancelRidePageShow(),
|
||||||
const CashConfirmPageShown(),
|
CashConfirmPageShown(),
|
||||||
const PaymentMethodPage(),
|
const PaymentMethodPage(),
|
||||||
timerForCancelTripFromPassenger(),
|
timerForCancelTripFromPassenger(),
|
||||||
// const DriverTimeArrivePassengerPage(),
|
// const DriverTimeArrivePassengerPage(),
|
||||||
|
|||||||
@@ -334,81 +334,82 @@ GetBuilder<MapPassengerController> buttomSheetMapPage() {
|
|||||||
width: Get.width * .95,
|
width: Get.width * .95,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
TextButton(
|
// TextButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Get.defaultDialog(
|
// Get.defaultDialog(
|
||||||
barrierDismissible: false,
|
// barrierDismissible: false,
|
||||||
title:
|
// title:
|
||||||
'How Many Passengers?'.tr,
|
// 'How Many Passengers?'.tr,
|
||||||
titleStyle: AppStyle.title,
|
// titleStyle: AppStyle.title,
|
||||||
content: Column(
|
// content: Column(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'Allowed up to 4 Passengers.'
|
// 'Allowed up to 4 Passengers.'
|
||||||
.tr,
|
// .tr,
|
||||||
style: AppStyle.title,
|
// style: AppStyle.title,
|
||||||
),
|
// ),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
height:
|
// height:
|
||||||
200, // Set the desired height here
|
// 200, // Set the desired height here
|
||||||
child: CupertinoPicker(
|
// child: CupertinoPicker(
|
||||||
itemExtent: 32,
|
// itemExtent: 32,
|
||||||
onSelectedItemChanged:
|
// onSelectedItemChanged:
|
||||||
(index) {
|
// (index) {
|
||||||
controller
|
// controller
|
||||||
.onChangedPassengerCount(
|
// .onChangedPassengerCount(
|
||||||
index + 1);
|
// index + 1);
|
||||||
},
|
// },
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'1 Passenger'.tr),
|
// '1 Passenger'.tr),
|
||||||
Text('2 Passengers'
|
// Text('2 Passengers'
|
||||||
.tr),
|
// .tr),
|
||||||
Text('3 Passengers'
|
// Text('3 Passengers'
|
||||||
.tr),
|
// .tr),
|
||||||
Text('4 Passengers'
|
// Text('4 Passengers'
|
||||||
.tr),
|
// .tr),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
MyElevatedButton(
|
// MyElevatedButton(
|
||||||
title: 'Back',
|
// title: 'Back',
|
||||||
onPressed: () =>
|
// onPressed: () =>
|
||||||
Get.back(),
|
// Get.back(),
|
||||||
)
|
// )
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
child: Row(
|
// child: Row(
|
||||||
mainAxisAlignment:
|
// mainAxisAlignment:
|
||||||
MainAxisAlignment
|
// MainAxisAlignment
|
||||||
.spaceBetween,
|
// .spaceBetween,
|
||||||
children: [
|
// children: [
|
||||||
Text('How Many Passengers?'.tr,
|
// Text('How Many Passengers?'.tr,
|
||||||
style: AppStyle.title),
|
// style: AppStyle.title),
|
||||||
const SizedBox(
|
// const SizedBox(
|
||||||
width: 10,
|
// width: 10,
|
||||||
),
|
// ),
|
||||||
Container(
|
// Container(
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
border: Border.all()),
|
// border: Border.all()),
|
||||||
child: Padding(
|
// child: Padding(
|
||||||
padding:
|
// padding:
|
||||||
const EdgeInsets.all(
|
// const EdgeInsets.all(
|
||||||
3.0),
|
// 3.0),
|
||||||
child: Text(
|
// child: Text(
|
||||||
controller
|
// controller
|
||||||
.selectedPassengerCount
|
// .selectedPassengerCount
|
||||||
.toString(),
|
// .toString(),
|
||||||
style: AppStyle.title),
|
// style: AppStyle.title),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
|
|
||||||
controller.isCashSelectedBeforeConfirmRide ==
|
controller.isCashSelectedBeforeConfirmRide ==
|
||||||
false
|
false
|
||||||
? MyElevatedButton(
|
? MyElevatedButton(
|
||||||
|
|||||||
@@ -2,17 +2,20 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../controller/home/map_passenger_controller.dart';
|
import '../../../controller/home/map_passenger_controller.dart';
|
||||||
import '../../../controller/payment/payment_controller.dart';
|
import '../../../controller/payment/payment_controller.dart';
|
||||||
import '../../../main.dart';
|
import '../../../main.dart';
|
||||||
|
import '../../widgets/elevated_btn.dart';
|
||||||
|
import '../my_wallet/passenger_wallet_dialoge.dart';
|
||||||
|
|
||||||
class CashConfirmPageShown extends StatelessWidget {
|
class CashConfirmPageShown extends StatelessWidget {
|
||||||
const CashConfirmPageShown({
|
CashConfirmPageShown({
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
PaymentController paymentController = Get.put(PaymentController());
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<MapPassengerController>(
|
return GetBuilder<MapPassengerController>(
|
||||||
@@ -39,11 +42,11 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
'Payment Method'.tr,
|
'Payment Method'.tr,
|
||||||
style: AppStyle.title.copyWith(fontSize: 22),
|
style: AppStyle.title.copyWith(fontSize: 22),
|
||||||
),
|
),
|
||||||
IconButton(
|
// IconButton(
|
||||||
onPressed: () =>
|
// onPressed: () =>
|
||||||
controller.changeCashConfirmPageShown(),
|
// controller.changeCashConfirmPageShown(),
|
||||||
icon: const Icon(Icons.close),
|
// icon: const Icon(Icons.close),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
GetBuilder<PaymentController>(
|
GetBuilder<PaymentController>(
|
||||||
@@ -123,16 +126,38 @@ class CashConfirmPageShown extends StatelessWidget {
|
|||||||
height: 2,
|
height: 2,
|
||||||
indent: 1,
|
indent: 1,
|
||||||
),
|
),
|
||||||
// controller.cardNumber == null ||
|
// GetBuilder<PaymentController>(
|
||||||
// controller.cardNumber!.isEmpty
|
// builder: (paymentController) =>
|
||||||
// ? MyElevatedButton(
|
// (paymentController.isWalletChecked == false &&
|
||||||
// title: 'Add Payment Method'.tr,
|
// paymentController.isCashChecked == true
|
||||||
// onPressed: () {
|
// ? MyElevatedButton(
|
||||||
// controller.changePaymentMethodPageShown();
|
// title: 'Next'.tr,
|
||||||
// CreditCardController().openPayment();
|
// onPressed: () {
|
||||||
// },
|
// controller.changeCashConfirmPageShown();
|
||||||
// )
|
// },
|
||||||
// : const SizedBox()
|
// )
|
||||||
|
// : const SizedBox())),
|
||||||
|
GetBuilder<PaymentController>(
|
||||||
|
builder: (paymentController) => (box
|
||||||
|
.read(BoxName.passengerWalletTotal) ==
|
||||||
|
null ||
|
||||||
|
double.parse(box
|
||||||
|
.read(BoxName.passengerWalletTotal)) <
|
||||||
|
controller.totalPassenger)
|
||||||
|
? MyElevatedButton(
|
||||||
|
title: 'To use Wallet charge it'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
Get.to(() => const PassengerWallet());
|
||||||
|
},
|
||||||
|
kolor: AppColor.redColor,
|
||||||
|
)
|
||||||
|
: MyElevatedButton(
|
||||||
|
title: 'Next'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
controller.changeCashConfirmPageShown();
|
||||||
|
},
|
||||||
|
), // Add a fallback widget if none of the conditions are met
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/controller/functions/secure_storage.dart';
|
import 'package:ride/controller/functions/secure_storage.dart';
|
||||||
import 'package:ride/controller/home/payment/credit_card_controller.dart';
|
import 'package:ride/controller/home/payment/credit_card_controller.dart';
|
||||||
|
import 'package:ride/main.dart';
|
||||||
import 'package:ride/views/widgets/elevated_btn.dart';
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
@@ -76,7 +77,7 @@ class PaymentMethodPage extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
const CreditCardWidget(),
|
const MyCreditCardWidget(),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
GetBuilder<CreditCardController>(
|
GetBuilder<CreditCardController>(
|
||||||
builder: (controller) => Row(
|
builder: (controller) => Row(
|
||||||
@@ -115,8 +116,8 @@ class PaymentMethodPage extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CreditCardWidget extends StatelessWidget {
|
class MyCreditCardWidget extends StatelessWidget {
|
||||||
const CreditCardWidget({
|
const MyCreditCardWidget({
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -125,11 +126,20 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
Get.put(CreditCardController());
|
Get.put(CreditCardController());
|
||||||
return GetBuilder<CreditCardController>(
|
return GetBuilder<CreditCardController>(
|
||||||
builder: (controller) => Container(
|
builder: (controller) => Container(
|
||||||
height: Get.height * .3,
|
height: Get.height * .35,
|
||||||
width: Get.width * .9,
|
width: Get.width * .9,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: AppColor.secondaryColor,
|
color: AppColor.secondaryColor,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15)),
|
borderRadius: BorderRadius.all(Radius.circular(15)),
|
||||||
|
gradient: LinearGradient(colors: [
|
||||||
|
AppColor.secondaryColor,
|
||||||
|
// AppColor.blueColor,
|
||||||
|
// AppColor.greenColor,
|
||||||
|
AppColor.accentColor,
|
||||||
|
// AppColor.primaryColor,
|
||||||
|
// AppColor.redColor,
|
||||||
|
// AppColor.yellowColor
|
||||||
|
]),
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
spreadRadius: 3,
|
spreadRadius: 3,
|
||||||
@@ -148,7 +158,7 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -156,22 +166,33 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
getCardIcon(controller.cardNumberController
|
getCardIcon(controller.cardNumberController
|
||||||
.text), // Dynamic credit card icon
|
.text), // Dynamic credit card icon
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .1,
|
width: Get.width * .03,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .6,
|
width: Get.width * .25,
|
||||||
|
child: Text(
|
||||||
|
'Card Number',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .03,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .4,
|
||||||
height: 70,
|
height: 70,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
maxLength: 16,
|
maxLength: 16,
|
||||||
keyboardType: TextInputType.number,
|
keyboardType: TextInputType.number,
|
||||||
controller: controller.cardNumberController,
|
controller: controller.cardNumberController,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
|
color: AppColor.blueColor,
|
||||||
fontFamily: 'digital-counter-7',
|
fontFamily: 'digital-counter-7',
|
||||||
fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold),
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
helperStyle: TextStyle(
|
helperStyle: TextStyle(
|
||||||
fontFamily: 'digital-counter-7'),
|
fontFamily: 'digital-counter-7'),
|
||||||
labelText: 'Card Number',
|
// labelText: 'Card Number',
|
||||||
),
|
),
|
||||||
inputFormatters: [DigitObscuringFormatter()],
|
inputFormatters: [DigitObscuringFormatter()],
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
@@ -190,19 +211,30 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Icon(Icons.person),
|
const Icon(Icons.person),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .1,
|
width: Get.width * .03,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .6,
|
width: Get.width * .25,
|
||||||
|
child: Text(
|
||||||
|
'Holder Name',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .03,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: Get.width * .3,
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 50,
|
// height: 50,
|
||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
keyboardType: TextInputType.text,
|
keyboardType: TextInputType.text,
|
||||||
// maxLength: 16,
|
// maxLength: 16,
|
||||||
controller: controller.cardHolderNameController,
|
controller: controller.cardHolderNameController,
|
||||||
decoration: const InputDecoration(
|
decoration: const InputDecoration(
|
||||||
labelText: 'Cardholder Name'),
|
// labelText: 'Cardholder Name',
|
||||||
|
),
|
||||||
validator: (value) {
|
validator: (value) {
|
||||||
if (value!.isEmpty) {
|
if (value!.isEmpty) {
|
||||||
return 'Please enter the cardholder name'
|
return 'Please enter the cardholder name'
|
||||||
@@ -224,28 +256,40 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Icon(Icons.date_range_outlined),
|
const Icon(Icons.date_range_outlined),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .1,
|
width: Get.width * .03,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Column(
|
||||||
width: Get.width * .2,
|
children: [
|
||||||
child: SizedBox(
|
SizedBox(
|
||||||
height: 60,
|
width: Get.width * .2,
|
||||||
child: TextFormField(
|
child: Text(
|
||||||
keyboardType: TextInputType.datetime,
|
'Expiry Date',
|
||||||
controller:
|
style: AppStyle.subtitle,
|
||||||
controller.expiryDateController,
|
),
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'Expiry Date'),
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty) {
|
|
||||||
return 'Please enter the expiry date'
|
|
||||||
.tr;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
)
|
width: Get.width * .1,
|
||||||
|
child: SizedBox(
|
||||||
|
height: 60,
|
||||||
|
child: TextFormField(
|
||||||
|
maxLength: 4,
|
||||||
|
keyboardType: TextInputType.datetime,
|
||||||
|
controller:
|
||||||
|
controller.expiryDateController,
|
||||||
|
style: AppStyle.title,
|
||||||
|
decoration: const InputDecoration(),
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty) {
|
||||||
|
return 'Please enter the expiry date'
|
||||||
|
.tr;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -257,50 +301,76 @@ class CreditCardWidget extends StatelessWidget {
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: Get.width * .021,
|
width: Get.width * .021,
|
||||||
),
|
),
|
||||||
SizedBox(
|
Column(
|
||||||
width: Get.width * .2,
|
children: [
|
||||||
child: SizedBox(
|
SizedBox(
|
||||||
height: 60,
|
width: Get.width * .2,
|
||||||
child: TextFormField(
|
child: Text(
|
||||||
obscureText: true,
|
'CVV Code',
|
||||||
keyboardType: TextInputType.number,
|
style: AppStyle.subtitle,
|
||||||
style: const TextStyle(
|
),
|
||||||
fontFamily: 'digital-counter-7'),
|
|
||||||
maxLength: 3,
|
|
||||||
controller: controller.cvvCodeController,
|
|
||||||
decoration: const InputDecoration(
|
|
||||||
labelText: 'CVV Code'),
|
|
||||||
validator: (value) {
|
|
||||||
if (value!.isEmpty &&
|
|
||||||
value.length != 3) {
|
|
||||||
return 'Please enter the CVV code'.tr;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
),
|
SizedBox(
|
||||||
|
width: Get.width * .2,
|
||||||
|
child: SizedBox(
|
||||||
|
height: 60,
|
||||||
|
child: TextFormField(
|
||||||
|
obscureText: true,
|
||||||
|
keyboardType: TextInputType.number,
|
||||||
|
style: const TextStyle(
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
fontFamily: 'digital-counter-7'),
|
||||||
|
maxLength: 3,
|
||||||
|
controller:
|
||||||
|
controller.cvvCodeController,
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
// labelText: 'CVV Code',
|
||||||
|
),
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty &&
|
||||||
|
value.length != 3) {
|
||||||
|
return 'Please enter the CVV code'
|
||||||
|
.tr;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
// MyElevatedButton(
|
MyElevatedButton(
|
||||||
// title: 'Save'.tr,
|
title: 'Save'.tr,
|
||||||
// onPressed: () {
|
onPressed: () {
|
||||||
// if (controller.formKey.currentState!.validate()) {
|
if (controller.formKey.currentState!.validate()) {
|
||||||
// final creditCard = CreditCardModel(
|
// final creditCard = CreditCardModel(
|
||||||
// cardNumber: controller.cardNumberController.text,
|
// cardNumber: controller.cardNumberController.text,
|
||||||
// cardHolderName:
|
// cardHolderName:
|
||||||
// controller.cardHolderNameController.text,
|
// controller.cardHolderNameController.text,
|
||||||
// expiryDate: controller.expiryDateController.text,
|
// expiryDate: controller.expiryDateController.text,
|
||||||
// cvvCode: controller.cvvCodeController.text,
|
// cvvCode: controller.cvvCodeController.text,
|
||||||
// );
|
// );
|
||||||
// // Process the credit card details
|
// Process the credit card details
|
||||||
// // You can use GetX to handle the logic here
|
// You can use GetX to handle the logic here
|
||||||
// }
|
|
||||||
// },
|
if (controller.formKey.currentState!.validate()) {
|
||||||
// ),
|
SecureStorage().saveData(BoxName.cardNumber,
|
||||||
|
controller.cardNumberController.text);
|
||||||
|
SecureStorage().saveData(BoxName.cardHolderName,
|
||||||
|
controller.cardHolderNameController.text);
|
||||||
|
SecureStorage().saveData(BoxName.cvvCode,
|
||||||
|
controller.cvvCodeController.text);
|
||||||
|
SecureStorage().saveData(BoxName.expiryDate,
|
||||||
|
controller.expiryDateController.text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))));
|
))));
|
||||||
|
|||||||
@@ -1,21 +1,19 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:ride/constant/links.dart';
|
|
||||||
import 'package:ride/constant/style.dart';
|
|
||||||
import 'package:ride/controller/functions/crud.dart';
|
|
||||||
import 'package:ride/controller/functions/toast.dart';
|
|
||||||
import 'package:ride/controller/payment/payment_controller.dart';
|
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
|
||||||
import 'package:flutter_paypal/flutter_paypal.dart';
|
|
||||||
import '../../../constant/box_name.dart';
|
import '../../../constant/box_name.dart';
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../constant/info.dart';
|
import '../../../constant/info.dart';
|
||||||
|
import '../../../constant/style.dart';
|
||||||
import '../../../controller/functions/secure_storage.dart';
|
import '../../../controller/functions/secure_storage.dart';
|
||||||
|
import '../../../controller/functions/toast.dart';
|
||||||
import '../../../controller/home/payment/credit_card_controller.dart';
|
import '../../../controller/home/payment/credit_card_controller.dart';
|
||||||
|
import '../../../controller/payment/payment_controller.dart';
|
||||||
import '../../../main.dart';
|
import '../../../main.dart';
|
||||||
import '../../widgets/elevated_btn.dart';
|
import '../../widgets/elevated_btn.dart';
|
||||||
|
import '../../widgets/my_scafold.dart';
|
||||||
import '../map_widget.dart/payment_method.page.dart';
|
import '../map_widget.dart/payment_method.page.dart';
|
||||||
|
import 'passenger_wallet_dialoge.dart';
|
||||||
|
|
||||||
class PassengerWallet extends StatelessWidget {
|
class PassengerWallet extends StatelessWidget {
|
||||||
const PassengerWallet({super.key});
|
const PassengerWallet({super.key});
|
||||||
@@ -62,14 +60,11 @@ class PassengerWallet extends StatelessWidget {
|
|||||||
child:
|
child:
|
||||||
box.read(BoxName.passengerWalletTotal) == null
|
box.read(BoxName.passengerWalletTotal) == null
|
||||||
? Text(
|
? Text(
|
||||||
'You Dont Have Any amount in'.tr +
|
'${'You Dont Have Any amount in'.tr} ${AppInformation.appName}${'Wallet!'.tr}',
|
||||||
' ${AppInformation.appName}' +
|
|
||||||
'Wallet!'.tr,
|
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
)
|
)
|
||||||
: Text(
|
: Text(
|
||||||
'You Have'.tr +
|
'${'You Have'.tr} ${box.read(BoxName.passengerWalletTotal).toString()} JD in ${AppInformation.appName} Wallet',
|
||||||
' ${box.read(BoxName.passengerWalletTotal).toString()} JD in ${AppInformation.appName} Wallet',
|
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -79,7 +74,7 @@ class PassengerWallet extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
),
|
),
|
||||||
const CreditCardWidget(),
|
const MyCreditCardWidget(),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
@@ -202,158 +197,7 @@ class PassengerWallet extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
GetBuilder<PaymentController>(
|
PassengerWalletDialoge()
|
||||||
builder: (controller) => Positioned(
|
|
||||||
top: Get.height * .2,
|
|
||||||
right: Get.width * .15,
|
|
||||||
left: Get.width * .15,
|
|
||||||
bottom: Get.height * .2,
|
|
||||||
child: controller.isPromoSheetDialogue
|
|
||||||
? Container(
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
||||||
color: AppColor.secondaryColor,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: AppColor.accentColor,
|
|
||||||
offset: Offset(-1, -1),
|
|
||||||
blurRadius: 0,
|
|
||||||
spreadRadius: 0,
|
|
||||||
blurStyle: BlurStyle.normal),
|
|
||||||
BoxShadow(
|
|
||||||
color: AppColor.accentColor,
|
|
||||||
offset: Offset(3, 3),
|
|
||||||
blurRadius: 1,
|
|
||||||
spreadRadius: 0,
|
|
||||||
blurStyle: BlurStyle.normal)
|
|
||||||
]),
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.all(6),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.updateSelectedAmount(10);
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Radio(
|
|
||||||
value: 10,
|
|
||||||
groupValue: controller.selectedAmount,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller
|
|
||||||
.updateSelectedAmount(value as int);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'10 and get 4% discount'.tr,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.updateSelectedAmount(20);
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Radio(
|
|
||||||
value: 20,
|
|
||||||
groupValue: controller.selectedAmount,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller
|
|
||||||
.updateSelectedAmount(value as int);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'20 and get 6% discount'.tr,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.updateSelectedAmount(40);
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Radio(
|
|
||||||
value: 40,
|
|
||||||
groupValue: controller.selectedAmount,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller
|
|
||||||
.updateSelectedAmount(value as int);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'40 and get 8% discount'.tr,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () {
|
|
||||||
controller.updateSelectedAmount(100);
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Radio(
|
|
||||||
value: 100,
|
|
||||||
groupValue: controller.selectedAmount,
|
|
||||||
onChanged: (value) {
|
|
||||||
controller
|
|
||||||
.updateSelectedAmount(value as int);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'100 and get 11% discount'.tr,
|
|
||||||
style: AppStyle.title,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
const Spacer(),
|
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Pay with Your PayPal'.tr,
|
|
||||||
onPressed: () {
|
|
||||||
if (controller.selectedAmount != 0) {
|
|
||||||
controller.makePaymentPayPal(context);
|
|
||||||
} else {
|
|
||||||
Toast.show(
|
|
||||||
context,
|
|
||||||
'You will choose one of above !'.tr,
|
|
||||||
AppColor.redColor);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Pay with Credit Card'.tr,
|
|
||||||
onPressed: () {
|
|
||||||
if (controller.selectedAmount != 0) {
|
|
||||||
controller.makePaymentStripe(
|
|
||||||
controller.selectedAmount as int,
|
|
||||||
'USD',
|
|
||||||
() => Get.snackbar('Hi', ''));
|
|
||||||
} else {
|
|
||||||
Toast.show(
|
|
||||||
context,
|
|
||||||
'You will choose one of above !'.tr,
|
|
||||||
AppColor.redColor);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Cancel'.tr,
|
|
||||||
kolor: AppColor.redColor,
|
|
||||||
onPressed: () {
|
|
||||||
controller.changePromoSheetDialogue();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
))
|
|
||||||
: const SizedBox()),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
168
lib/views/home/my_wallet/passenger_wallet_dialoge.dart
Normal file
168
lib/views/home/my_wallet/passenger_wallet_dialoge.dart
Normal file
@@ -0,0 +1,168 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/functions/toast.dart';
|
||||||
|
import 'package:ride/controller/payment/payment_controller.dart';
|
||||||
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
|
|
||||||
|
class PassengerWalletDialoge extends StatelessWidget {
|
||||||
|
const PassengerWalletDialoge({
|
||||||
|
super.key,
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return GetBuilder<PaymentController>(
|
||||||
|
builder: (controller) => Positioned(
|
||||||
|
top: Get.height * .2,
|
||||||
|
right: Get.width * .15,
|
||||||
|
left: Get.width * .15,
|
||||||
|
bottom: Get.height * .2,
|
||||||
|
child: controller.isPromoSheetDialogue
|
||||||
|
? Container(
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||||
|
color: AppColor.secondaryColor,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColor.accentColor,
|
||||||
|
offset: Offset(-1, -1),
|
||||||
|
blurRadius: 0,
|
||||||
|
spreadRadius: 0,
|
||||||
|
blurStyle: BlurStyle.normal),
|
||||||
|
BoxShadow(
|
||||||
|
color: AppColor.accentColor,
|
||||||
|
offset: Offset(3, 3),
|
||||||
|
blurRadius: 1,
|
||||||
|
spreadRadius: 0,
|
||||||
|
blurStyle: BlurStyle.normal)
|
||||||
|
]),
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(6),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.updateSelectedAmount(10);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Radio(
|
||||||
|
value: 10,
|
||||||
|
groupValue: controller.selectedAmount,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller.updateSelectedAmount(value as int);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'10 and get 4% discount'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.updateSelectedAmount(20);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Radio(
|
||||||
|
value: 20,
|
||||||
|
groupValue: controller.selectedAmount,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller
|
||||||
|
.updateSelectedAmount(value as int);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'20 and get 6% discount'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.updateSelectedAmount(40);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Radio(
|
||||||
|
value: 40,
|
||||||
|
groupValue: controller.selectedAmount,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller
|
||||||
|
.updateSelectedAmount(value as int);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'40 and get 8% discount'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
controller.updateSelectedAmount(100);
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Radio(
|
||||||
|
value: 100,
|
||||||
|
groupValue: controller.selectedAmount,
|
||||||
|
onChanged: (value) {
|
||||||
|
controller
|
||||||
|
.updateSelectedAmount(value as int);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'100 and get 11% discount'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
const Spacer(),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Pay with Your PayPal'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
if (controller.selectedAmount != 0) {
|
||||||
|
controller.makePaymentPayPal(context);
|
||||||
|
} else {
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'You will choose one of above !'.tr,
|
||||||
|
AppColor.redColor);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Pay with Credit Card'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
if (controller.selectedAmount != 0) {
|
||||||
|
controller.makePaymentStripe(
|
||||||
|
controller.selectedAmount as int,
|
||||||
|
'USD',
|
||||||
|
() => controller.addPassengerWallet());
|
||||||
|
} else {
|
||||||
|
Toast.show(
|
||||||
|
context,
|
||||||
|
'You will choose one of above !'.tr,
|
||||||
|
AppColor.redColor);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Cancel'.tr,
|
||||||
|
kolor: AppColor.redColor,
|
||||||
|
onPressed: () {
|
||||||
|
controller.changePromoSheetDialogue();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
: const SizedBox()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
58
lib/views/home/my_wallet/points_captain.dart
Normal file
58
lib/views/home/my_wallet/points_captain.dart
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/home/payment/captain_wallet_controller.dart';
|
||||||
|
import 'package:ride/controller/payment/payment_controller.dart';
|
||||||
|
|
||||||
|
class PointsCaptain extends StatelessWidget {
|
||||||
|
PaymentController paymentController = Get.put(PaymentController());
|
||||||
|
CaptainWalletController captainWalletController =
|
||||||
|
Get.put(CaptainWalletController());
|
||||||
|
|
||||||
|
PointsCaptain({
|
||||||
|
super.key,
|
||||||
|
required this.kolor,
|
||||||
|
required this.countPoint,
|
||||||
|
required this.pricePoint,
|
||||||
|
});
|
||||||
|
final Color kolor;
|
||||||
|
final String countPoint;
|
||||||
|
int pricePoint;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return InkWell(
|
||||||
|
onTap: () async {
|
||||||
|
await paymentController.makePaymentStripe(pricePoint, 'USD', () async {
|
||||||
|
await captainWalletController.addDriverPayment('visa', pricePoint);
|
||||||
|
await captainWalletController.addDriverWallet('visa', countPoint);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: Get.width * .2,
|
||||||
|
height: Get.width * .2,
|
||||||
|
margin: const EdgeInsets.all(4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: kolor,
|
||||||
|
border: Border.all(color: AppColor.accentColor),
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
shape: BoxShape.rectangle,
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'$countPoint Point',
|
||||||
|
style: AppStyle.subtitle,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'$pricePoint\$',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,16 +1,97 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/colors.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/home/payment/captain_wallet_controller.dart';
|
||||||
|
import 'package:ride/controller/home/payment/credit_card_controller.dart';
|
||||||
|
import 'package:ride/views/home/map_widget.dart/payment_method.page.dart';
|
||||||
|
import 'package:ride/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
|
import '../../../controller/payment/payment_controller.dart';
|
||||||
import '../../widgets/my_scafold.dart';
|
import '../../widgets/my_scafold.dart';
|
||||||
|
import 'points_captain.dart';
|
||||||
|
|
||||||
class WaletCaptain extends StatelessWidget {
|
class WaletCaptain extends StatelessWidget {
|
||||||
const WaletCaptain({super.key});
|
WaletCaptain({super.key});
|
||||||
|
CaptainWalletController captainWalletController =
|
||||||
|
Get.put(CaptainWalletController());
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
Get.put(CreditCardController());
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Wallet'.tr,
|
title: 'Captain Wallet'.tr,
|
||||||
body: [],
|
body: [
|
||||||
|
GetBuilder<CaptainWalletController>(
|
||||||
|
builder: (captainWalletController) => captainWalletController
|
||||||
|
.isLoading
|
||||||
|
? const MyCircularProgressIndicator()
|
||||||
|
: Padding(
|
||||||
|
padding: const EdgeInsets.all(20),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Card(
|
||||||
|
elevation: 4,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: Text(
|
||||||
|
'Total Points is ${captainWalletController.totalPoints} 💎',
|
||||||
|
style: AppStyle.headtitle2,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Card(
|
||||||
|
elevation: 4,
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
|
child: Text(
|
||||||
|
'Total Budget from trips is ${captainWalletController.totalAmount}\$',
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'You can buy Points to let you online\nby this list below'
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
const Divider(
|
||||||
|
indent: 30,
|
||||||
|
endIndent: 30,
|
||||||
|
color: AppColor.accentColor,
|
||||||
|
thickness: 3,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: AppStyle.boxDecoration,
|
||||||
|
height: Get.height * .120,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
PointsCaptain(
|
||||||
|
kolor: AppColor.blueColor,
|
||||||
|
pricePoint: 5,
|
||||||
|
countPoint: '500',
|
||||||
|
),
|
||||||
|
PointsCaptain(
|
||||||
|
kolor: Colors.green,
|
||||||
|
pricePoint: 10,
|
||||||
|
countPoint: '1040',
|
||||||
|
),
|
||||||
|
PointsCaptain(
|
||||||
|
kolor: Colors.amberAccent,
|
||||||
|
pricePoint: 20,
|
||||||
|
countPoint: '2100',
|
||||||
|
),
|
||||||
|
PointsCaptain(
|
||||||
|
kolor: AppColor.yellowColor,
|
||||||
|
pricePoint: 50,
|
||||||
|
countPoint: '50400',
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
isleading: true,
|
isleading: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,88 +1,151 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:path/path.dart';
|
|
||||||
import 'package:ride/constant/box_name.dart';
|
import 'package:ride/constant/box_name.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/profile/captain_profile_controller.dart';
|
||||||
import 'package:ride/env/env.dart';
|
import 'package:ride/env/env.dart';
|
||||||
import 'package:ride/main.dart';
|
import 'package:ride/main.dart';
|
||||||
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
import 'package:ride/views/widgets/my_scafold.dart';
|
||||||
|
|
||||||
|
import '../../widgets/my_textField.dart';
|
||||||
|
|
||||||
class ProfileCaptain extends StatelessWidget {
|
class ProfileCaptain extends StatelessWidget {
|
||||||
const ProfileCaptain({super.key});
|
const ProfileCaptain({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
Get.put(CaptainProfileController());
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'My Profile'.tr,
|
title: 'My Profile'.tr,
|
||||||
body: [
|
body: [
|
||||||
Padding(
|
GetBuilder<CaptainProfileController>(
|
||||||
padding: const EdgeInsets.all(16.0),
|
builder: (controller) => Padding(
|
||||||
child: SingleChildScrollView(
|
padding: const EdgeInsets.all(16.0),
|
||||||
child: Center(
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Center(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
CircleAvatar(
|
children: [
|
||||||
radius: Get.width * 0.26,
|
CircleAvatar(
|
||||||
backgroundColor: Colors.white,
|
radius: Get.width * 0.26,
|
||||||
backgroundImage: CachedNetworkImageProvider(
|
backgroundColor: Colors.white,
|
||||||
"${Env.serverPHP}/card_image/${box.read(BoxName.driverID)}.jpg",
|
backgroundImage: CachedNetworkImageProvider(
|
||||||
),
|
"${Env.serverPHP}/card_image/${box.read(BoxName.driverID)}.jpg",
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text(
|
||||||
|
box.read(BoxName.nameDriver) +
|
||||||
|
' ' +
|
||||||
|
box.read(BoxName.lastNameDriver).toString(),
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Email is :${box.read(BoxName.emailDriver)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Phone Number is :${box.read(BoxName.phoneDriver)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Date of Birth is :${box.read(BoxName.dobDriver)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Sex is :${box.read(BoxName.sexDriver)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
const Divider(
|
||||||
|
// height: 2,
|
||||||
|
endIndent: 1,
|
||||||
|
indent: 2,
|
||||||
|
thickness: 2,
|
||||||
|
),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Car Details'.tr, style: AppStyle.headtitle2),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('VIN is :${box.read(BoxName.vin)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Color is :${box.read(BoxName.color)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Make is :${box.read(BoxName.make)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Model is :${box.read(BoxName.model)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text('Year is :${box.read(BoxName.year)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
Text(
|
||||||
|
'Expiration Date :${box.read(BoxName.expirationDate)}',
|
||||||
|
style: AppStyle.title),
|
||||||
|
const SizedBox(height: 8.0),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8.0),
|
),
|
||||||
Text(
|
|
||||||
box.read(BoxName.nameDriver) +
|
|
||||||
' ' +
|
|
||||||
box.read(BoxName.lastNameDriver).toString(),
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Email is :${box.read(BoxName.emailDriver)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Phone Number is :${box.read(BoxName.phoneDriver)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Date of Birth is :${box.read(BoxName.dobDriver)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Sex is :${box.read(BoxName.sexDriver)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
const Divider(
|
|
||||||
// height: 2,
|
|
||||||
endIndent: 1,
|
|
||||||
indent: 2,
|
|
||||||
thickness: 2,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Car Details'.tr, style: AppStyle.headtitle2),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('VIN is :${box.read(BoxName.vin)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Color is :${box.read(BoxName.color)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Make is :${box.read(BoxName.make)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Model is :${box.read(BoxName.model)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Year is :${box.read(BoxName.year)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
Text('Expiration Date :${box.read(BoxName.expirationDate)}',
|
|
||||||
style: AppStyle.title),
|
|
||||||
const SizedBox(height: 8.0),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
isleading: true,
|
||||||
|
action: GetBuilder<CaptainProfileController>(
|
||||||
|
builder: (controller) => IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: 'Edit Your data',
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
content: SizedBox(
|
||||||
|
height: Get.height * .4,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.vin,
|
||||||
|
hint: 'write vin for your car',
|
||||||
|
label: 'VIN',
|
||||||
|
type: TextInputType.emailAddress,
|
||||||
|
),
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.color,
|
||||||
|
hint: 'write Color for your car',
|
||||||
|
label: 'Color',
|
||||||
|
type: TextInputType.emailAddress,
|
||||||
|
),
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.make,
|
||||||
|
hint: 'write Make for your car',
|
||||||
|
label: 'Make',
|
||||||
|
type: TextInputType.emailAddress,
|
||||||
|
),
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.model,
|
||||||
|
hint: 'write Model for your car',
|
||||||
|
label: 'Model',
|
||||||
|
type: TextInputType.emailAddress,
|
||||||
|
),
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.year,
|
||||||
|
hint: 'write Year for your car',
|
||||||
|
label: 'Year',
|
||||||
|
type: TextInputType.number,
|
||||||
|
),
|
||||||
|
MyTextForm(
|
||||||
|
controller: controller.expirationDate,
|
||||||
|
hint: 'write Expiration Date for your car',
|
||||||
|
label: 'Expiration Date',
|
||||||
|
type: TextInputType.datetime),
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Update'.tr,
|
||||||
|
onPressed: () => controller.updateFields())
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.edit),
|
||||||
),
|
),
|
||||||
),
|
));
|
||||||
],
|
|
||||||
isleading: true,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,73 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/controller/auth/captin/notification_captain_controller.dart';
|
||||||
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
import 'package:ride/views/widgets/my_scafold.dart';
|
import 'package:ride/views/widgets/my_scafold.dart';
|
||||||
|
import 'package:ride/views/widgets/mycircular.dart';
|
||||||
|
|
||||||
class NotificationCaptain extends StatelessWidget {
|
class NotificationCaptain extends StatelessWidget {
|
||||||
const NotificationCaptain({super.key});
|
const NotificationCaptain({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
Get.put(NotificationCaptainController());
|
||||||
|
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
title: 'Notifications'.tr,
|
title: 'Notifications'.tr,
|
||||||
body: [],
|
body: [
|
||||||
|
GetBuilder<NotificationCaptainController>(
|
||||||
|
builder: (notificationCaptainController) =>
|
||||||
|
notificationCaptainController.isloading
|
||||||
|
? const MyCircularProgressIndicator()
|
||||||
|
: SafeArea(
|
||||||
|
child: ListView.builder(
|
||||||
|
itemCount: notificationCaptainController
|
||||||
|
.notificationData['message'].length,
|
||||||
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
if (notificationCaptainController
|
||||||
|
.notificationData['message'] ==
|
||||||
|
"No notification data found") {
|
||||||
|
Get.defaultDialog();
|
||||||
|
}
|
||||||
|
var res = notificationCaptainController
|
||||||
|
.notificationData['message'][index];
|
||||||
|
return Card(
|
||||||
|
elevation: 4,
|
||||||
|
child: ListTile(
|
||||||
|
onTap: () {
|
||||||
|
Get.defaultDialog(
|
||||||
|
title: res['title'],
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
content: SizedBox(
|
||||||
|
width: Get.width * .8,
|
||||||
|
height: Get.height * .4,
|
||||||
|
child: Text(
|
||||||
|
res['body'],
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'Ok',
|
||||||
|
onPressed: () {
|
||||||
|
//todo sql readen
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
leading:
|
||||||
|
const Icon(Icons.notification_important),
|
||||||
|
title: Text(
|
||||||
|
res['title'],
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
subtitle: Text(
|
||||||
|
res['body'],
|
||||||
|
style: AppStyle.subtitle,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
isleading: true,
|
isleading: true,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,17 @@ class MyScafolld extends StatelessWidget {
|
|||||||
style: AppStyle.title.copyWith(fontSize: 30),
|
style: AppStyle.title.copyWith(fontSize: 30),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SafeArea(child: Stack(children: body)));
|
body: SafeArea(
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: Get.height,
|
||||||
|
width: Get.width,
|
||||||
|
child: Stack(children: body))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
53
lib/views/widgets/my_textField.dart
Normal file
53
lib/views/widgets/my_textField.dart
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
|
import '../../constant/colors.dart';
|
||||||
|
|
||||||
|
class MyTextForm extends StatelessWidget {
|
||||||
|
const MyTextForm({
|
||||||
|
super.key,
|
||||||
|
required this.controller,
|
||||||
|
required this.label,
|
||||||
|
required this.hint,
|
||||||
|
required this.type,
|
||||||
|
});
|
||||||
|
final TextEditingController controller;
|
||||||
|
final String label, hint;
|
||||||
|
final TextInputType type;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.only(bottom: 10),
|
||||||
|
child: SizedBox(
|
||||||
|
width: Get.width * .8,
|
||||||
|
child: TextFormField(
|
||||||
|
keyboardType: type,
|
||||||
|
cursorColor: AppColor.accentColor,
|
||||||
|
controller: controller,
|
||||||
|
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: label.tr,
|
||||||
|
hintText: hint.tr,
|
||||||
|
),
|
||||||
|
validator: (value) {
|
||||||
|
if (value!.isEmpty || value.length != 10) {
|
||||||
|
return 'Please enter $label.'.tr;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,7 +31,6 @@ dependencies:
|
|||||||
custom_searchable_dropdown: ^2.1.1
|
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
|
||||||
# credit_card_scanner: ^1.0.5
|
|
||||||
geolocator: ^10.0.0
|
geolocator: ^10.0.0
|
||||||
flutter_paypal: ^0.2.0
|
flutter_paypal: ^0.2.0
|
||||||
flutter_launcher_icons: ^0.13.1
|
flutter_launcher_icons: ^0.13.1
|
||||||
|
|||||||
Reference in New Issue
Block a user