12/9/1
This commit is contained in:
2
.env
2
.env
@@ -15,3 +15,5 @@ llamaKey=LL-JfdiCXFpcLXNe87cSGQwGE0piZ9Zw179tVjEP1KMxQgVWGxD9Ixz3m8kkKaO5Kdi
|
|||||||
serverPHP=https://ride.mobile-app.store
|
serverPHP=https://ride.mobile-app.store
|
||||||
Cohere=Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK
|
Cohere=Qfrhx9d5YVHiy4uEuK4wiFc9kIuFFlvc5A6WVzPK
|
||||||
ClaudeAiAPI=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
|
ClaudeAiAPI=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
|
||||||
|
payPalClientId=AWj9MdPaA5Djpx8gOkvBn2qhP-3KvfB6W-l8USTsm19Xi2NhkNkE9QzosOvTPTsKjCMNffgpqStUA1-x
|
||||||
|
payPalSecret=EKkasSl9O61lrfrbaJfXp1B-CIs2Rv71J0WPouxxugi38DsWaMhWpovJxN2ftYPQ0l6v9eoBvnyWkemp
|
||||||
|
|||||||
@@ -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 12
|
versionCode 14
|
||||||
versionName '1.1.6'
|
versionName '1.3.7'
|
||||||
}
|
}
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ class BoxName {
|
|||||||
static const String password = "password";
|
static const String password = "password";
|
||||||
static const String passwordDriver = "passwordDriver";
|
static const String passwordDriver = "passwordDriver";
|
||||||
static const String agreeTerms = "agreeTerms";
|
static const String agreeTerms = "agreeTerms";
|
||||||
|
static const String accountIdStripeConnect = "accountIdStripeConnect";
|
||||||
static const String faceDetectTimes = "faceDetectTimes";
|
static const String faceDetectTimes = "faceDetectTimes";
|
||||||
static const String sosPhonePassenger = "sosPhonePassenger";
|
static const String sosPhonePassenger = "sosPhonePassenger";
|
||||||
static const String passengerID = "pasengerID";
|
static const String passengerID = "pasengerID";
|
||||||
|
|||||||
@@ -53,10 +53,14 @@ class LoginController extends GetxController {
|
|||||||
if (jsonDecoeded['data'][0]['verified'] == 1) {
|
if (jsonDecoeded['data'][0]['verified'] == 1) {
|
||||||
box.write(BoxName.passengerID, jsonDecoeded['data'][0]['id']);
|
box.write(BoxName.passengerID, jsonDecoeded['data'][0]['id']);
|
||||||
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
|
box.write(BoxName.email, jsonDecoeded['data'][0]['email']);
|
||||||
box.write(BoxName.name, jsonDecoeded['data'][0]['first_name']);
|
box.write(
|
||||||
|
BoxName.name,
|
||||||
|
jsonDecoeded['data'][0]['first_name'] +
|
||||||
|
' ' +
|
||||||
|
jsonDecoeded['data'][0]['last_name']);
|
||||||
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
|
box.write(BoxName.phone, jsonDecoeded['data'][0]['phone']);
|
||||||
SecureStorage().saveData(BoxName.password, passwordController.text);
|
SecureStorage().saveData(BoxName.password, passwordController.text);
|
||||||
Get.offAll(() => MapPagePassenger());
|
Get.offAll(() => const MapPagePassenger());
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
print(box.read(BoxName.passengerID).toString());
|
print(box.read(BoxName.passengerID).toString());
|
||||||
@@ -78,7 +82,7 @@ class LoginController extends GetxController {
|
|||||||
'email': emailController.text,
|
'email': emailController.text,
|
||||||
'token': randomNumber.toString(),
|
'token': randomNumber.toString(),
|
||||||
}).then((value) => print(value));
|
}).then((value) => print(value));
|
||||||
Get.to(() => VerifyEmailPage());
|
Get.to(() => const VerifyEmailPage());
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,11 +70,11 @@ class RegisterController extends GetxController {
|
|||||||
void register() async {
|
void register() async {
|
||||||
if (formKey.currentState!.validate()) {
|
if (formKey.currentState!.validate()) {
|
||||||
var res = await CRUD().post(link: AppLink.signUp, payload: {
|
var res = await CRUD().post(link: AppLink.signUp, payload: {
|
||||||
'first_name': firstNameController.text,
|
'first_name': firstNameController.text.toString(),
|
||||||
'last_name': lastNameController.text,
|
'last_name': lastNameController.text.toString(),
|
||||||
'email': emailController.text,
|
'email': emailController.text.toString(),
|
||||||
'phone': phoneController.text,
|
'phone': phoneController.text.toString(),
|
||||||
'password': passwordController.text,
|
'password': passwordController.text.toString(),
|
||||||
'gender': gender,
|
'gender': gender,
|
||||||
'site': siteController.text,
|
'site': siteController.text,
|
||||||
'birthdate': birthDate,
|
'birthdate': birthDate,
|
||||||
|
|||||||
@@ -126,8 +126,13 @@ class CRUD {
|
|||||||
'Authorization': 'Bearer ${AK.secretKey}',
|
'Authorization': 'Bearer ${AK.secretKey}',
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
print(response);
|
||||||
return response.body;
|
return response.body;
|
||||||
|
} else {
|
||||||
|
print('eeeeeeeeerrrrorrrr ${response.statusCode}');
|
||||||
|
print(response.body);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<dynamic> post({
|
Future<dynamic> post({
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ class MapDriverController extends GetxController {
|
|||||||
double progress = 0;
|
double progress = 0;
|
||||||
double progressToPassenger = 0;
|
double progressToPassenger = 0;
|
||||||
bool isRideBegin = false;
|
bool isRideBegin = false;
|
||||||
int progressTimerToShowPassengerInfoWindowFromDriver = 20;
|
int progressTimerToShowPassengerInfoWindowFromDriver = 25;
|
||||||
int remainingTimeToShowPassengerInfoWindowFromDriver = 20;
|
int remainingTimeToShowPassengerInfoWindowFromDriver = 25;
|
||||||
int remainingTimeToPassenger = 60;
|
int remainingTimeToPassenger = 60;
|
||||||
bool isDriverNearPassengerStart = false;
|
bool isDriverNearPassengerStart = false;
|
||||||
GoogleMapController? mapController;
|
GoogleMapController? mapController;
|
||||||
@@ -206,7 +206,7 @@ class MapDriverController extends GetxController {
|
|||||||
});
|
});
|
||||||
rideIsBeginPassengerTimer();
|
rideIsBeginPassengerTimer();
|
||||||
double pointsSubstraction = 0;
|
double pointsSubstraction = 0;
|
||||||
pointsSubstraction = double.parse(paymentAmount) * -100;
|
pointsSubstraction = double.parse(paymentAmount) * -1;
|
||||||
var res = await CRUD().post(link: AppLink.addDriversWallet, payload: {
|
var res = await CRUD().post(link: AppLink.addDriversWallet, payload: {
|
||||||
'paymentID': 'rideId$rideId',
|
'paymentID': 'rideId$rideId',
|
||||||
'amount': (pointsSubstraction).toString(),
|
'amount': (pointsSubstraction).toString(),
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class MapPassengerController extends GetxController {
|
|||||||
|
|
||||||
// Format the message.
|
// Format the message.
|
||||||
String message =
|
String message =
|
||||||
'Hi! This is ${box.read(BoxName.name)}. I am using ${box.read(AppInformation.appName)} to ride with ${dataCarsLocationByPassenger['message'][carsOrder]['first_name'].toString()} as the driver. ${dataCarsLocationByPassenger['message'][carsOrder]['first_name'].toString()} is driving a ${dataCarsLocationByPassenger['message'][carsOrder]['model'].toString()} with license plate ${dataCarsLocationByPassenger['message'][carsOrder]['license_plate'].toString()}. I am currently located at $myLocation. If you need to reach me, please contact the driver directly at $driverPhone.';
|
'Hi! This is ${box.read(BoxName.name)}.\n I am using ${box.read(AppInformation.appName)} to ride with ${dataCarsLocationByPassenger['message'][carsOrder]['first_name'].toString()} as the driver. ${dataCarsLocationByPassenger['message'][carsOrder]['first_name'].toString()} \nis driving a ${dataCarsLocationByPassenger['message'][carsOrder]['model'].toString()}\n with license plate ${dataCarsLocationByPassenger['message'][carsOrder]['license_plate'].toString()}.\n I am currently located at $myLocation.\n If you need to reach me, please contact the driver directly at\n\n $driverPhone.';
|
||||||
|
|
||||||
// Launch the URL to send the SMS.
|
// Launch the URL to send the SMS.
|
||||||
launchCommunication('whatsapp', to, message);
|
launchCommunication('whatsapp', to, message);
|
||||||
@@ -586,6 +586,7 @@ class MapPassengerController extends GetxController {
|
|||||||
isCashConfirmPageShown = false;
|
isCashConfirmPageShown = false;
|
||||||
isPassengerChosen = false;
|
isPassengerChosen = false;
|
||||||
isCashSelectedBeforeConfirmRide = false;
|
isCashSelectedBeforeConfirmRide = false;
|
||||||
|
isPickerShown = false;
|
||||||
timeToPassengerFromDriverAfterApplied = 0;
|
timeToPassengerFromDriverAfterApplied = 0;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
@@ -596,6 +597,7 @@ class MapPassengerController extends GetxController {
|
|||||||
"order_id": rideId.toString(), // Convert to String
|
"order_id": rideId.toString(), // Convert to String
|
||||||
"status": 'Cancel'
|
"status": 'Cancel'
|
||||||
});
|
});
|
||||||
|
isPickerShown = false;
|
||||||
rideConfirm = false;
|
rideConfirm = false;
|
||||||
shouldFetch = false;
|
shouldFetch = false;
|
||||||
isPassengerChosen = false;
|
isPassengerChosen = false;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:http/http.dart' as http;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_paypal/flutter_paypal.dart';
|
import 'package:flutter_paypal/flutter_paypal.dart';
|
||||||
import 'package:flutter_stripe/flutter_stripe.dart';
|
import 'package:flutter_stripe/flutter_stripe.dart';
|
||||||
@@ -27,6 +27,10 @@ class PaymentController extends GetxController {
|
|||||||
int? selectedAmount = 0;
|
int? selectedAmount = 0;
|
||||||
List<dynamic> totalPassengerWalletDetails = [];
|
List<dynamic> totalPassengerWalletDetails = [];
|
||||||
String passengerTotalWalletAmount = '';
|
String passengerTotalWalletAmount = '';
|
||||||
|
String ip = '1';
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
late int timestamp;
|
||||||
|
|
||||||
void updateSelectedAmount(int value) {
|
void updateSelectedAmount(int value) {
|
||||||
selectedAmount = value;
|
selectedAmount = value;
|
||||||
update();
|
update();
|
||||||
@@ -200,7 +204,11 @@ class PaymentController extends GetxController {
|
|||||||
Future<String> getClientSecret(String amount, currency) async {
|
Future<String> getClientSecret(String amount, currency) async {
|
||||||
var res = await CRUD().postStripe(
|
var res = await CRUD().postStripe(
|
||||||
link: 'https://api.stripe.com/v1/payment_intents',
|
link: 'https://api.stripe.com/v1/payment_intents',
|
||||||
payload: {'amount': amount, 'currency': currency},
|
payload: {
|
||||||
|
'amount': amount,
|
||||||
|
'currency': currency,
|
||||||
|
'payment_method_types[0]': 'card'
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Convert the res object to a JSON object
|
// Convert the res object to a JSON object
|
||||||
@@ -240,11 +248,11 @@ class PaymentController extends GetxController {
|
|||||||
builder: (BuildContext context) => UsePaypal(
|
builder: (BuildContext context) => UsePaypal(
|
||||||
sandboxMode: true,
|
sandboxMode: true,
|
||||||
clientId:
|
clientId:
|
||||||
"AW1TdvpSGbIM5iP4HJNI5TyTmwpY9Gv9dYw8_8yW5lYIbCqf326vrkrp0ce9TAqjEGMHiV3OqJM_aRT0",
|
"AWj9MdPaA5Djpx8gOkvBn2qhP-3KvfB6W-l8USTsm19Xi2NhkNkE9QzosOvTPTsKjCMNffgpqStUA1-x",
|
||||||
secretKey:
|
secretKey:
|
||||||
"EHHtTDjnmTZATYBPiGzZC_AZUfMpMAzj2VZUeqlFUrRJA_C0pQNCxDccB5qoRQSEdcOnnKQhycuOWdP9",
|
"EKkasSl9O61lrfrbaJfXp1B-CIs2Rv71J0WPouxxugi38DsWaMhWpovJxN2ftYPQ0l6v9eoBvnyWkemp",
|
||||||
returnURL: "https://samplesite.com/return",
|
returnURL: "https://mobile-app.store",
|
||||||
cancelURL: "https://samplesite.com/cancel",
|
cancelURL: "https://mobile-app.store/cancel",
|
||||||
transactions: [
|
transactions: [
|
||||||
{
|
{
|
||||||
"amount": {
|
"amount": {
|
||||||
@@ -318,8 +326,128 @@ class PaymentController extends GetxController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map licenseDetailsMap = {};
|
||||||
|
Future getLicenseInfo() async {
|
||||||
|
var res = await CRUD().get(
|
||||||
|
link: AppLink.getLicense,
|
||||||
|
payload: {'driverID': box.read(BoxName.driverID)});
|
||||||
|
licenseDetailsMap = jsonDecode(res);
|
||||||
|
// print(licenseDetailsMap['message'][0]['name']);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future createConnectAccount() async {
|
||||||
|
String url = 'https://api.stripe.com/v1/accounts';
|
||||||
|
await getLicenseInfo();
|
||||||
|
DateTime dob =
|
||||||
|
DateTime.parse(licenseDetailsMap['message'][0]['dateOfBirth']);
|
||||||
|
int currentTimestamp =
|
||||||
|
(DateTime.now().millisecondsSinceEpoch / 1000).round();
|
||||||
|
print('Current Unix timestamp: $currentTimestamp');
|
||||||
|
int day = dob.day;
|
||||||
|
int month = dob.month;
|
||||||
|
int year = dob.year;
|
||||||
|
await getIpAddress();
|
||||||
|
final body = {
|
||||||
|
"type": "custom",
|
||||||
|
"business_profile[name]": box.read(BoxName.nameDriver),
|
||||||
|
"business_profile[product_description]": "Captain",
|
||||||
|
"business_profile[support_address][city]": "San Francisco",
|
||||||
|
"business_profile[support_address][country]": "US",
|
||||||
|
"business_profile[support_address][line1]":
|
||||||
|
licenseDetailsMap['message'][0]['address'].toString().trim()[0],
|
||||||
|
"business_profile[support_address][postal_code]":
|
||||||
|
licenseDetailsMap['message'][0]['postalCode'],
|
||||||
|
"business_profile[support_address][state]": "MA",
|
||||||
|
"business_profile[support_email]": "support@mobile-app.store",
|
||||||
|
"business_profile[support_phone]": "555-123-4567",
|
||||||
|
"business_profile[url]": "https://mobile-app.store",
|
||||||
|
"business_type": "individual",
|
||||||
|
"capabilities[card_payments][requested]": "true",
|
||||||
|
"capabilities[transfers][requested]": "true",
|
||||||
|
"company[address][city]": "San Francisco",
|
||||||
|
"company[address][country]": "US",
|
||||||
|
"company[address][line1]": "122 Main St",
|
||||||
|
"company[address][postal_code]": "94111",
|
||||||
|
"company[address][state]": "MA",
|
||||||
|
"company[name]": AppInformation.companyName,
|
||||||
|
"country": "us",
|
||||||
|
"default_currency": "usd",
|
||||||
|
"email": "support@mobile.store",
|
||||||
|
// "individual[ssn]": "123-45-6789", //
|
||||||
|
"individual[id_number]": licenseDetailsMap['message'][0]['documentNo'],
|
||||||
|
// "individual[id_type]": "drivers_license", //
|
||||||
|
"individual[address][city]": "San Francisco",
|
||||||
|
"individual[address][country]": "US",
|
||||||
|
"individual[address][line1]": licenseDetailsMap['message'][0]['address'],
|
||||||
|
// "individual[address][postal_code]": licenseDetailsMap['message'][0]
|
||||||
|
// ['postalCode'],
|
||||||
|
"individual[address][state]": "CA",
|
||||||
|
// "individual[ssn_last_4]": '1111', ////////
|
||||||
|
"individual[dob][day]": day.toString(),
|
||||||
|
"individual[dob][month]": month.toString(),
|
||||||
|
"individual[dob][year]": year.toString(),
|
||||||
|
"individual[email]": box.read(BoxName.emailDriver),
|
||||||
|
"individual[first_name]":
|
||||||
|
licenseDetailsMap['message'][0]['name'].toString().split(' ')[0],
|
||||||
|
"individual[gender]":
|
||||||
|
licenseDetailsMap['message'][0]['sex'] == 'M' ? 'male' : 'female',
|
||||||
|
"individual[last_name]":
|
||||||
|
licenseDetailsMap['message'][0]['name'].toString().split(' ')[1],
|
||||||
|
// "individual[phone]": box.read(BoxName.phoneDriver),////////////
|
||||||
|
"tos_acceptance[date]": currentTimestamp.toString(),
|
||||||
|
"tos_acceptance[ip]": ip.toString()
|
||||||
|
};
|
||||||
|
|
||||||
|
final response = await CRUD().postStripe(
|
||||||
|
link: url,
|
||||||
|
payload: body,
|
||||||
|
);
|
||||||
|
final responseData = jsonDecode(response);
|
||||||
|
print(responseData);
|
||||||
|
final accountId = responseData['id'];
|
||||||
|
box.write(BoxName.accountIdStripeConnect, accountId);
|
||||||
|
print('accountId = $accountId');
|
||||||
|
return accountId;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> createTransactionToCaptain(
|
||||||
|
String amount, String account) async {
|
||||||
|
String url = 'https://api.stripe.com//v1/transfers';
|
||||||
|
|
||||||
|
final body = {
|
||||||
|
'amount': amount, //amount
|
||||||
|
'currency': 'aed',
|
||||||
|
'destination': account //'acct_1OKIjQRgcWrsdyDT' //account id
|
||||||
|
};
|
||||||
|
|
||||||
|
final response = await CRUD().postStripe(
|
||||||
|
link: url,
|
||||||
|
payload: body,
|
||||||
|
);
|
||||||
|
final responseData = jsonDecode(response);
|
||||||
|
print(responseData);
|
||||||
|
final transactionId = responseData['id'];
|
||||||
|
box.write(BoxName.accountIdStripeConnect, transactionId);
|
||||||
|
print('transactionId = $transactionId');
|
||||||
|
return transactionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future getIpAddress() async {
|
||||||
|
var url = Uri.parse('https://api.ipify.org?format=json');
|
||||||
|
|
||||||
|
var response = await http.get(url);
|
||||||
|
|
||||||
|
if (response.statusCode == 200) {
|
||||||
|
ip = jsonDecode(response.body)['ip'];
|
||||||
|
print(ip);
|
||||||
|
} else {
|
||||||
|
print('Request failed with status: ${response.statusCode}');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
|
timestamp = now.millisecondsSinceEpoch;
|
||||||
getPassengerWallet();
|
getPassengerWallet();
|
||||||
final localAuth = LocalAuthentication();
|
final localAuth = LocalAuthentication();
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|||||||
@@ -57,6 +57,9 @@ class ProfileController extends GetxController {
|
|||||||
'id': prfoileData['id'].toString(),
|
'id': prfoileData['id'].toString(),
|
||||||
columnName: txtController.text,
|
columnName: txtController.text,
|
||||||
});
|
});
|
||||||
|
if (columnName == 'first_name') {
|
||||||
|
box.write(BoxName.name, txtController.text);
|
||||||
|
}
|
||||||
Get.back();
|
Get.back();
|
||||||
txtController.clear();
|
txtController.clear();
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -41,11 +41,8 @@ class SosConnect extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
launchCommunication(
|
launchCommunication(
|
||||||
'whatsapp',
|
'whatsapp',
|
||||||
'962' +
|
'+962${box.read(BoxName.phoneDriver)}', //todo add number from driver
|
||||||
box.read(BoxName
|
'${'Hello this is Captain'.tr} ${box.read(BoxName.nameDriver)}');
|
||||||
.phoneDriver), //todo add number from driver
|
|
||||||
'Hello this is Captain'.tr +
|
|
||||||
' ${box.read(BoxName.nameDriver)}');
|
|
||||||
},
|
},
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
FontAwesome.whatsapp,
|
FontAwesome.whatsapp,
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import 'map_widget.dart/cash_confirm_bottom_page.dart';
|
|||||||
import 'map_widget.dart/driver_card_from_passenger.dart';
|
import 'map_widget.dart/driver_card_from_passenger.dart';
|
||||||
import 'map_widget.dart/google_map_passenger_widget.dart';
|
import 'map_widget.dart/google_map_passenger_widget.dart';
|
||||||
import 'map_widget.dart/left_main_menu_icons.dart'; //Ml@6Pt@11
|
import 'map_widget.dart/left_main_menu_icons.dart'; //Ml@6Pt@11
|
||||||
import 'map_widget.dart/main_bottom_Menu_map.dart';
|
import 'map_widget.dart/main_bottom_menu_map.dart';
|
||||||
import 'map_widget.dart/map_menu_widget.dart';
|
import 'map_widget.dart/map_menu_widget.dart';
|
||||||
import 'map_widget.dart/menu_map_page.dart';
|
import 'map_widget.dart/menu_map_page.dart';
|
||||||
import 'map_widget.dart/payment_method.page.dart';
|
import 'map_widget.dart/payment_method.page.dart';
|
||||||
@@ -99,7 +99,8 @@ class PickerIconOnMap extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return GetBuilder<MapPassengerController>(
|
return GetBuilder<MapPassengerController>(
|
||||||
builder: (controller) => Positioned(
|
builder: (controller) => controller.isPickerShown
|
||||||
|
? Positioned(
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
top: 0,
|
top: 0,
|
||||||
left: 0,
|
left: 0,
|
||||||
@@ -110,6 +111,7 @@ class PickerIconOnMap extends StatelessWidget {
|
|||||||
color: Colors.purple,
|
color: Colors.purple,
|
||||||
)
|
)
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
));
|
)
|
||||||
|
: const SizedBox());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,8 +21,16 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
|||||||
const BoxDecoration(color: AppColor.secondaryColor),
|
const BoxDecoration(color: AppColor.secondaryColor),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
|
border: const OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.only(),
|
||||||
|
gapPadding: 4,
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: AppColor.redColor,
|
||||||
|
width: 2,
|
||||||
|
)),
|
||||||
suffixIcon: const Icon(Icons.search),
|
suffixIcon: const Icon(Icons.search),
|
||||||
hintText: 'Type here Place'.tr,
|
hintText: 'Search for your destination'.tr,
|
||||||
|
hintStyle: AppStyle.title,
|
||||||
hintMaxLines: 1,
|
hintMaxLines: 1,
|
||||||
prefixIcon: IconButton(
|
prefixIcon: IconButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -46,6 +54,19 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
controller.places.isEmpty
|
||||||
|
? InkWell(
|
||||||
|
onTap: () {
|
||||||
|
controller.changeMainBottomMenuMap();
|
||||||
|
controller.changePickerShown();
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
'Choose from Map'.tr,
|
||||||
|
style:
|
||||||
|
AppStyle.title.copyWith(color: AppColor.blueColor),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: const SizedBox(),
|
||||||
Container(
|
Container(
|
||||||
height: controller.places.isNotEmpty ? controller.height : 0,
|
height: controller.places.isNotEmpty ? controller.height : 0,
|
||||||
color: AppColor.secondaryColor,
|
color: AppColor.secondaryColor,
|
||||||
@@ -60,6 +81,7 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
|||||||
title:
|
title:
|
||||||
'${'Are You sure to ride to'.tr} ${res['name']}',
|
'${'Are You sure to ride to'.tr} ${res['name']}',
|
||||||
middleText: '',
|
middleText: '',
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Confirm'.tr,
|
title: 'Confirm'.tr,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import 'package:animated_text_kit/animated_text_kit.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
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';
|
||||||
@@ -67,46 +66,104 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
child: DefaultTextStyle(
|
child: DefaultTextStyle(
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: controller.isPickerShown
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
? TextButton(
|
||||||
|
onPressed: () async {
|
||||||
|
controller.clearPolyline();
|
||||||
|
controller.data = [];
|
||||||
|
await controller.getMap(
|
||||||
|
'${controller.myLocation.latitude},${controller.myLocation.longitude}',
|
||||||
|
'${controller.newMyLocation.latitude},${controller.newMyLocation.longitude}',
|
||||||
|
);
|
||||||
|
controller.places = [];
|
||||||
|
controller.placeController.clear();
|
||||||
|
|
||||||
|
controller.showBottomSheet1();
|
||||||
|
Get.back();
|
||||||
|
controller.showBottomSheet1();
|
||||||
|
// controller.changeMainBottomMenuMap();
|
||||||
|
},
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
IconButton(
|
||||||
|
onPressed: () {
|
||||||
|
controller
|
||||||
|
.changeMainBottomMenuMap();
|
||||||
|
},
|
||||||
|
icon:
|
||||||
|
controller.isMainBottomMenuMap
|
||||||
|
? const Icon(
|
||||||
|
Icons
|
||||||
|
.arrow_circle_up_rounded,
|
||||||
|
size: 35,
|
||||||
|
)
|
||||||
|
: const Icon(
|
||||||
|
Icons
|
||||||
|
.arrow_circle_down_rounded,
|
||||||
|
size: 35,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"Click here to go to this location"
|
||||||
|
.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Column(
|
||||||
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 30,
|
height: 30,
|
||||||
child: Text(
|
child: Row(
|
||||||
'${'Where to'.tr} ${box.read(BoxName.name)}')
|
children: [
|
||||||
// AnimatedTextKit(
|
IconButton(
|
||||||
// animatedTexts: [
|
onPressed: () {
|
||||||
// ScaleAnimatedText(
|
controller
|
||||||
// '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
.changeMainBottomMenuMap();
|
||||||
// // WavyAnimatedText(
|
},
|
||||||
// // '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
icon: controller
|
||||||
// // FlickerAnimatedText(
|
.isMainBottomMenuMap
|
||||||
// // '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
? const Icon(
|
||||||
// // WavyAnimatedText(
|
Icons
|
||||||
// // '${'Where to'.tr} ${box.read(BoxName.name)}'),
|
.arrow_circle_up_rounded,
|
||||||
// ],
|
size: 35,
|
||||||
// isRepeatingAnimation: true,
|
)
|
||||||
// onTap: () {
|
: const Icon(
|
||||||
// print("Tap Event");
|
Icons
|
||||||
// },
|
.arrow_circle_down_rounded,
|
||||||
// ),
|
size: 35,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${'Where to'.tr} ${box.read(BoxName.name)}'),
|
||||||
|
],
|
||||||
|
)),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.center,
|
MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
const SizedBox(
|
||||||
|
width: 10,
|
||||||
|
),
|
||||||
controller.noCarString == false
|
controller.noCarString == false
|
||||||
? Text(
|
? Text(
|
||||||
'Nearest Car for you about '.tr)
|
'Nearest Car for you about '
|
||||||
|
.tr)
|
||||||
: Container(
|
: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(12),
|
BorderRadius
|
||||||
color: AppColor.redColor,
|
.circular(12),
|
||||||
|
color:
|
||||||
|
AppColor.redColor,
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(6),
|
const EdgeInsets
|
||||||
|
.all(6),
|
||||||
child: Text(
|
child: Text(
|
||||||
'No Car in your site. Sorry!'
|
'No Car in your site. Sorry!'
|
||||||
.tr,
|
.tr,
|
||||||
@@ -121,12 +178,13 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
? Container(
|
? Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color:
|
color: AppColor
|
||||||
AppColor.redColor,
|
.redColor,
|
||||||
width: 3)),
|
width: 3)),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding:
|
padding:
|
||||||
const EdgeInsets.all(4),
|
const EdgeInsets
|
||||||
|
.all(4),
|
||||||
child: Text((controller
|
child: Text((controller
|
||||||
.nearestCar !=
|
.nearestCar !=
|
||||||
null
|
null
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_font_icons/flutter_font_icons.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
|
import 'package:ride/views/auth/captin/register_captin.dart';
|
||||||
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
|
import 'package:ride/views/home/my_wallet/passenger_wallet.dart';
|
||||||
import 'package:ride/views/home/profile/feed_back_page.dart';
|
import 'package:ride/views/home/profile/feed_back_page.dart';
|
||||||
import 'package:ride/views/home/profile/order_history.dart';
|
import 'package:ride/views/home/profile/order_history.dart';
|
||||||
@@ -159,9 +161,11 @@ class MapMenuWidget extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
IconMainPageMap(
|
IconMainPageMap(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
title: 'Settings',
|
Get.to(const RegisterCaptin());
|
||||||
icon: Icons.settings,
|
},
|
||||||
|
title: 'Captain',
|
||||||
|
icon: WeatherIcons.wi_moon_14,
|
||||||
),
|
),
|
||||||
IconMainPageMap(
|
IconMainPageMap(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ class MyCreditCardWidget extends StatelessWidget {
|
|||||||
Get.put(CreditCardController());
|
Get.put(CreditCardController());
|
||||||
return GetBuilder<CreditCardController>(
|
return GetBuilder<CreditCardController>(
|
||||||
builder: (controller) => Container(
|
builder: (controller) => Container(
|
||||||
height: Get.height * .35,
|
height: Get.height * .4,
|
||||||
width: Get.width * .9,
|
width: Get.width * .9,
|
||||||
decoration: const BoxDecoration(
|
decoration: const BoxDecoration(
|
||||||
color: AppColor.secondaryColor,
|
color: AppColor.secondaryColor,
|
||||||
@@ -344,6 +344,9 @@ class MyCreditCardWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// const SizedBox(
|
||||||
|
// height: 20,
|
||||||
|
// ),
|
||||||
MyElevatedButton(
|
MyElevatedButton(
|
||||||
title: 'Save'.tr,
|
title: 'Save'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ class RideBeginPassenger extends StatelessWidget {
|
|||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
controller.sendWhatsapp(
|
controller.sendWhatsapp(
|
||||||
box.read(BoxName.sosPhonePassenger));
|
box.read(BoxName.sosPhonePassenger).toString());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
|
|||||||
@@ -78,37 +78,37 @@ class PassengerWallet extends StatelessWidget {
|
|||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
GetBuilder<CreditCardController>(
|
// GetBuilder<CreditCardController>(
|
||||||
builder: (creditCardController) => Row(
|
// builder: (creditCardController) => Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
MyElevatedButton(
|
|
||||||
title: 'Save Credit Card'.tr,
|
|
||||||
onPressed: () async {
|
|
||||||
if (controller.formKey.currentState!
|
|
||||||
.validate()) {
|
|
||||||
SecureStorage().saveData(
|
|
||||||
BoxName.cardNumber,
|
|
||||||
creditCardController
|
|
||||||
.cardNumberController.text);
|
|
||||||
SecureStorage().saveData(
|
|
||||||
BoxName.cardHolderName,
|
|
||||||
creditCardController
|
|
||||||
.cardHolderNameController.text);
|
|
||||||
SecureStorage().saveData(
|
|
||||||
BoxName.cvvCode,
|
|
||||||
creditCardController
|
|
||||||
.cvvCodeController.text);
|
|
||||||
SecureStorage().saveData(
|
|
||||||
BoxName.expiryDate,
|
|
||||||
creditCardController
|
|
||||||
.expiryDateController.text);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
// MyElevatedButton(
|
// MyElevatedButton(
|
||||||
|
// title: 'Save Credit Card'.tr,
|
||||||
|
// onPressed: () async {
|
||||||
|
// if (controller.formKey.currentState!
|
||||||
|
// .validate()) {
|
||||||
|
// SecureStorage().saveData(
|
||||||
|
// BoxName.cardNumber,
|
||||||
|
// creditCardController
|
||||||
|
// .cardNumberController.text);
|
||||||
|
// SecureStorage().saveData(
|
||||||
|
// BoxName.cardHolderName,
|
||||||
|
// creditCardController
|
||||||
|
// .cardHolderNameController.text);
|
||||||
|
// SecureStorage().saveData(
|
||||||
|
// BoxName.cvvCode,
|
||||||
|
// creditCardController
|
||||||
|
// .cvvCodeController.text);
|
||||||
|
// SecureStorage().saveData(
|
||||||
|
// BoxName.expiryDate,
|
||||||
|
// creditCardController
|
||||||
|
// .expiryDateController.text);
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// )),
|
||||||
|
// // MyElevatedButton(
|
||||||
// title: 'Charge your Wallet',
|
// title: 'Charge your Wallet',
|
||||||
// onPressed: () {
|
// onPressed: () {
|
||||||
// Get.defaultDialog(
|
// Get.defaultDialog(
|
||||||
@@ -197,7 +197,23 @@ class PassengerWallet extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
PassengerWalletDialoge()
|
PassengerWalletDialoge(),
|
||||||
|
GetBuilder<PaymentController>(
|
||||||
|
builder: (controller) => Positioned(
|
||||||
|
top: 440,
|
||||||
|
right: 100,
|
||||||
|
left: 100,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'createConnectAccount',
|
||||||
|
onPressed: () {
|
||||||
|
controller.createConnectAccount();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
))
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class PassengerWalletDialoge extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'10 and get 4% discount'.tr,
|
'10\$ and get 3% discount'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -78,7 +78,7 @@ class PassengerWalletDialoge extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'20 and get 6% discount'.tr,
|
'20\$ and get 4% discount'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -98,7 +98,7 @@ class PassengerWalletDialoge extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'40 and get 8% discount'.tr,
|
'40\$ and get 6% discount'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -118,7 +118,7 @@ class PassengerWalletDialoge extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'100 and get 11% discount'.tr,
|
'100\$ and get 9% discount'.tr,
|
||||||
style: AppStyle.title,
|
style: AppStyle.title,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -142,9 +142,12 @@ class PassengerWalletDialoge extends StatelessWidget {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (controller.selectedAmount != 0) {
|
if (controller.selectedAmount != 0) {
|
||||||
controller.makePaymentStripe(
|
controller.makePaymentStripe(
|
||||||
controller.selectedAmount as int,
|
controller.selectedAmount as int, 'USD',
|
||||||
'USD',
|
() {
|
||||||
() => controller.addPassengerWallet());
|
controller.addPassengerWallet();
|
||||||
|
controller.changePromoSheetDialogue();
|
||||||
|
controller.getPassengerWallet();
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
Toast.show(
|
Toast.show(
|
||||||
context,
|
context,
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/colors.dart';
|
import 'package:ride/constant/colors.dart';
|
||||||
import 'package:ride/constant/style.dart';
|
import 'package:ride/constant/style.dart';
|
||||||
import 'package:ride/controller/home/payment/captain_wallet_controller.dart';
|
import 'package:ride/controller/home/payment/captain_wallet_controller.dart';
|
||||||
import 'package:ride/controller/home/payment/credit_card_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/controller/payment/payment_controller.dart';
|
||||||
|
import 'package:ride/main.dart';
|
||||||
|
import 'package:ride/views/widgets/elevated_btn.dart';
|
||||||
import 'package:ride/views/widgets/mycircular.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';
|
import 'points_captain.dart';
|
||||||
|
|
||||||
@@ -88,6 +90,33 @@ class WaletCaptain extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
const SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
MyElevatedButton(
|
||||||
|
title: 'Create Wallet to recive your money',
|
||||||
|
onPressed: () async {
|
||||||
|
PaymentController paymentController =
|
||||||
|
Get.find<PaymentController>();
|
||||||
|
paymentController.createConnectAccount();
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
onPressed: () async {
|
||||||
|
PaymentController paymentController =
|
||||||
|
Get.put(PaymentController());
|
||||||
|
await paymentController.createTransactionToCaptain(
|
||||||
|
'1000',
|
||||||
|
box.read(BoxName.accountIdStripeConnect));
|
||||||
|
},
|
||||||
|
child: const Text(
|
||||||
|
"Pay to Captain",
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -58,14 +58,12 @@ class OrderHistory extends StatelessWidget {
|
|||||||
onTap: () {
|
onTap: () {
|
||||||
String mapUrl =
|
String mapUrl =
|
||||||
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
|
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
|
||||||
print(mapUrl);
|
// print(mapUrl);
|
||||||
launchUrl1(mapUrl);
|
launchUrl1(mapUrl);
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Text(
|
||||||
children: [
|
'Click here to Show it in Map',
|
||||||
Text(rides['start_location']),
|
style: AppStyle.title,
|
||||||
Text(rides['end_location']),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
@@ -81,12 +79,13 @@ class OrderHistory extends StatelessWidget {
|
|||||||
Text(
|
Text(
|
||||||
rides['status'],
|
rides['status'],
|
||||||
style: rides['status'] != 'Canceled'
|
style: rides['status'] != 'Canceled'
|
||||||
? AppStyle.subtitle
|
? AppStyle.subtitle.copyWith(
|
||||||
|
color: AppColor.greenColor)
|
||||||
: AppStyle.subtitle
|
: AppStyle.subtitle
|
||||||
.copyWith(color: AppColor.redColor),
|
.copyWith(color: AppColor.redColor),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
rides['price'],
|
'Price is ${rides['price']}',
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -20,11 +20,6 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
Get.put(ProfileController());
|
Get.put(ProfileController());
|
||||||
return MyScafolld(
|
return MyScafolld(
|
||||||
isleading: true,
|
isleading: true,
|
||||||
action: MyElevatedButton(
|
|
||||||
title: 'Delete My Account'.tr,
|
|
||||||
onPressed: () {
|
|
||||||
LogOut().deleteMyAccount(box.read(BoxName.passengerID).toString());
|
|
||||||
}),
|
|
||||||
title: 'My Profile'.tr,
|
title: 'My Profile'.tr,
|
||||||
body: [
|
body: [
|
||||||
GetBuilder<ProfileController>(
|
GetBuilder<ProfileController>(
|
||||||
@@ -184,6 +179,7 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
controller.prfoileData['sosPhone']);
|
controller.prfoileData['sosPhone']);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
// const Spacer(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -191,13 +187,24 @@ class PassengerProfilePage extends StatelessWidget {
|
|||||||
)),
|
)),
|
||||||
Positioned(
|
Positioned(
|
||||||
left: 70,
|
left: 70,
|
||||||
bottom: 5,
|
bottom: 240,
|
||||||
right: 70,
|
right: 70,
|
||||||
child: MyElevatedButton(
|
child: MyElevatedButton(
|
||||||
title: 'Sign Out'.tr,
|
title: 'Sign Out'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
LogOut().logOut();
|
LogOut().logOut();
|
||||||
}),
|
}),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
left: 70,
|
||||||
|
bottom: 140,
|
||||||
|
right: 70,
|
||||||
|
child: MyElevatedButton(
|
||||||
|
title: 'Delete My Account'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
LogOut()
|
||||||
|
.deleteMyAccount(box.read(BoxName.passengerID).toString());
|
||||||
|
}),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
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/style.dart';
|
||||||
|
|
||||||
import '../../constant/box_name.dart';
|
import '../../constant/box_name.dart';
|
||||||
import '../../main.dart';
|
import '../../main.dart';
|
||||||
@@ -29,18 +30,8 @@ class NotificationPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
body: [
|
body: [
|
||||||
Container(
|
Container(
|
||||||
color: AppColor.accentColor.withOpacity(.7),
|
decoration: AppStyle.boxDecoration,
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
top: 100,
|
|
||||||
bottom: 100,
|
|
||||||
left: 50,
|
|
||||||
right: 50,
|
|
||||||
child: Container(
|
|
||||||
height: Get.height * .6,
|
|
||||||
color: AppColor.secondaryColor,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake)
|
|||||||
# https://github.com/flutter/flutter/issues/57146.
|
# https://github.com/flutter/flutter/issues/57146.
|
||||||
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
|
||||||
|
|
||||||
|
# Set fallback configurations for older versions of the flutter tool.
|
||||||
|
if (NOT DEFINED FLUTTER_TARGET_PLATFORM)
|
||||||
|
set(FLUTTER_TARGET_PLATFORM "windows-x64")
|
||||||
|
endif()
|
||||||
|
|
||||||
# === Flutter Library ===
|
# === Flutter Library ===
|
||||||
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
|
||||||
|
|
||||||
@@ -92,7 +97,7 @@ add_custom_command(
|
|||||||
COMMAND ${CMAKE_COMMAND} -E env
|
COMMAND ${CMAKE_COMMAND} -E env
|
||||||
${FLUTTER_TOOL_ENVIRONMENT}
|
${FLUTTER_TOOL_ENVIRONMENT}
|
||||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
|
||||||
windows-x64 $<CONFIG>
|
${FLUTTER_TARGET_PLATFORM} $<CONFIG>
|
||||||
VERBATIM
|
VERBATIM
|
||||||
)
|
)
|
||||||
add_custom_target(flutter_assemble DEPENDS
|
add_custom_target(flutter_assemble DEPENDS
|
||||||
|
|||||||
Reference in New Issue
Block a user