9/20/1
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'dart:convert';
|
||||
import 'package:crypto/crypto.dart';
|
||||
|
||||
class AppCredintials {
|
||||
static const String basicAuthCredentials = 'hamzaayedphp:malDEV@2101';
|
||||
@@ -14,3 +15,35 @@ class AppCredintials {
|
||||
static const String transactionCloude =
|
||||
'Authorization:API_EMDJX6BHQ67DBGT6WV:DG2XPU7YEN02M0VJ2F';
|
||||
}
|
||||
|
||||
class MyClass {
|
||||
static const String mapAPIKEY = 'AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0';
|
||||
static const String additionalText = 'additional text';
|
||||
|
||||
String getBasicAuthCredentials() {
|
||||
return base64Encode(utf8.encode(mapAPIKEY));
|
||||
}
|
||||
|
||||
String removeAddedText(String apiKey, String addedText) {
|
||||
final hashedText = sha256.convert(utf8.encode(addedText)).toString();
|
||||
return apiKey.replaceAll(hashedText, '');
|
||||
}
|
||||
|
||||
String addTextToAPIKey(String apiKey, String textToAdd) {
|
||||
final hashedText = sha256.convert(utf8.encode(textToAdd)).toString();
|
||||
final midIndex = apiKey.length ~/ 2;
|
||||
final firstHalf = apiKey.substring(0, midIndex);
|
||||
final secondHalf = apiKey.substring(midIndex);
|
||||
return '$firstHalf$hashedText$secondHalf';
|
||||
}
|
||||
|
||||
void exampleUsage() {
|
||||
String modifiedAPIKey = addTextToAPIKey(mapAPIKEY, additionalText);
|
||||
print('Modified API Key: $modifiedAPIKey');
|
||||
|
||||
String finalAPIKey = removeAddedText(modifiedAPIKey, additionalText);
|
||||
print('Final API Key: $finalAPIKey');
|
||||
}
|
||||
}
|
||||
// Modified API Key: AIzaSyCyfwRXTwSTLOFc57cb9e210a21def772cad3cd9ef83247e70bed77da89a64c9a5e91e7f3348dbQSQgN5p7QZgGJVZnEKq0
|
||||
// I/flutter ( 5490): Final API Key: AIzaSyCyfwRXTwSTLOFc57cb9e210a21def772cad3cd9ef83247e70bed77da89a64c9a5e91e7f3348dbQSQgN5p7QZgGJVZnEKq0
|
||||
@@ -29,23 +29,21 @@ class AppStyle {
|
||||
color: AppColor.primaryColor,
|
||||
fontFamily: GoogleFonts.josefinSans().fontFamily);
|
||||
|
||||
static BoxDecoration boxDecoration() {
|
||||
return const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(-3, -3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer),
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer)
|
||||
]);
|
||||
}
|
||||
static BoxDecoration boxDecoration = const BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
color: AppColor.secondaryColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(-3, -3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer),
|
||||
BoxShadow(
|
||||
color: AppColor.accentColor,
|
||||
offset: Offset(3, 3),
|
||||
blurRadius: 0,
|
||||
spreadRadius: 0,
|
||||
blurStyle: BlurStyle.outer)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -101,24 +101,19 @@ class LoginCaptinController extends GetxController {
|
||||
}
|
||||
|
||||
void loginByBoxData() async {
|
||||
isloading = true;
|
||||
update();
|
||||
Get.offAll(() => const HomeCaptin());
|
||||
Get.to(() => const HomeCaptin());
|
||||
await CRUD().post(link: AppLink.addTokensDriver, payload: {
|
||||
'token': box.read(BoxName.tokenDriver).toString(),
|
||||
'captain_id': box.read(BoxName.driverID).toString()
|
||||
});
|
||||
isloading = false;
|
||||
update();
|
||||
}
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
|
||||
if (box.read(BoxName.driverID) != null ||
|
||||
box.read(BoxName.driverID) != '') {
|
||||
loginByBoxData();
|
||||
}
|
||||
// if (box.read(BoxName.driverID).toString() != null) {
|
||||
// loginByBoxData();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import 'package:get/get.dart';
|
||||
import 'package:ride/constant/links.dart';
|
||||
import 'package:ride/controller/functions/crud.dart';
|
||||
import 'package:ride/views/auth/login_page.dart';
|
||||
import 'package:ride/views/home/map_page.dart';
|
||||
|
||||
import '../../views/auth/verify_email_page.dart';
|
||||
|
||||
|
||||
@@ -288,6 +288,12 @@ class FirebasMessagesController extends GetxController {
|
||||
var passengerList = message.data['passengerList'];
|
||||
print(passengerList);
|
||||
print('9999999999999my Apply Ride 999999999999999');
|
||||
MapController mapController = Get.find<MapController>();
|
||||
mapController.rideConfirm = false;
|
||||
update();
|
||||
print('-----------------------------rideConfirm===' +
|
||||
mapController.rideConfirm.toString());
|
||||
|
||||
var myList = jsonDecode(passengerList) as List<dynamic>;
|
||||
driverID = myList[2].toString();
|
||||
Get.snackbar(
|
||||
|
||||
@@ -5,7 +5,7 @@ class ScanIdCard extends GetxController {
|
||||
CardDetails? _cardDetails;
|
||||
CardScanOptions scanOptions = const CardScanOptions(
|
||||
scanCardHolderName: true,
|
||||
// enableDebugLogs: true,
|
||||
enableDebugLogs: true,
|
||||
validCardsToScanBeforeFinishingScan: 5,
|
||||
possibleCardHolderNamePositions: [
|
||||
CardHolderNameScanPosition.aboveCardNumber,
|
||||
|
||||
@@ -10,7 +10,7 @@ class TimerController extends GetxController {
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
startTimer();
|
||||
// startTimer();//TODO check if it true
|
||||
super.onInit();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ class MapController extends GetxController {
|
||||
BitmapDescriptor markerIcon = BitmapDescriptor.defaultMarker;
|
||||
BitmapDescriptor carIcon = BitmapDescriptor.defaultMarker;
|
||||
double height = 150;
|
||||
DateTime currentTime = DateTime.now();
|
||||
final location = Location();
|
||||
late LocationData currentLocation;
|
||||
double heightMenu = 0;
|
||||
@@ -187,6 +188,7 @@ class MapController extends GetxController {
|
||||
delayAndFetchRideStatus(rideId);
|
||||
if (shouldFetch == false) {
|
||||
startTimer();
|
||||
update();
|
||||
}
|
||||
update();
|
||||
}
|
||||
@@ -204,15 +206,16 @@ class MapController extends GetxController {
|
||||
decod['data'].toString() == 'Refused') {
|
||||
shouldFetch = false; // Stop further fetches
|
||||
rideConfirm = false;
|
||||
|
||||
startTimer();
|
||||
update();
|
||||
} else {
|
||||
delayAndFetchRideStatus(
|
||||
rideId); // Repeat the delay and fetch operation
|
||||
shouldFetch = true;
|
||||
update();
|
||||
// delayAndFetchRideStatus(
|
||||
// rideId); // Repeat the delay and fetch operation
|
||||
}
|
||||
}
|
||||
});
|
||||
startTimer();
|
||||
}
|
||||
|
||||
void startTimer() async {
|
||||
@@ -240,6 +243,108 @@ class MapController extends GetxController {
|
||||
return response['status'];
|
||||
}
|
||||
|
||||
Future getCarsLocationByPassenger() async {
|
||||
carsLocationByPassenger = [];
|
||||
LatLngBounds bounds =
|
||||
calculateBounds(mylocation.latitude, mylocation.longitude, 8000);
|
||||
print(
|
||||
'Southwest: ${bounds.southwest.latitude}, ${bounds.southwest.longitude}');
|
||||
print(
|
||||
'Northeast: ${bounds.northeast.latitude}, ${bounds.northeast.longitude}');
|
||||
|
||||
var res =
|
||||
await CRUD().get(link: AppLink.getCarsLocationByPassenger, payload: {
|
||||
'southwestLat': southwest.latitude.toString(),
|
||||
'southwestLon': southwest.longitude.toString(),
|
||||
'northeastLat': northeast.latitude.toString(),
|
||||
'northeastLon': northeast.longitude.toString(),
|
||||
});
|
||||
if (res == 'failure') {
|
||||
Get.defaultDialog(
|
||||
title: 'No Car in your site.Sorry!',
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Back',
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
markerReloadingTimer.cancel();
|
||||
}));
|
||||
} else {
|
||||
dataCarsLocationByPassenger = jsonDecode(res);
|
||||
// print(dataCarsLocationByPassenger);
|
||||
|
||||
for (var i = 0; i < dataCarsLocationByPassenger['message'].length; i++) {
|
||||
carsLocationByPassenger.add(LatLng(
|
||||
double.parse(dataCarsLocationByPassenger['message'][i]['latitude']),
|
||||
double.parse(
|
||||
dataCarsLocationByPassenger['message'][i]['longitude'])));
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Future getDriverCarsLocationToPassengerAfterApplied() async {
|
||||
driverCarsLocationToPassengerAfterApplied = [];
|
||||
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getDriverCarsLocationToPassengerAfterApplied,
|
||||
payload: {
|
||||
'driver_id': dataCarsLocationByPassenger['message'][0]['driver_id']
|
||||
});
|
||||
|
||||
datadriverCarsLocationToPassengerAfterApplied = jsonDecode(res);
|
||||
|
||||
driverCarsLocationToPassengerAfterApplied.add(LatLng(
|
||||
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||
['latitude']),
|
||||
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||
['longitude'])));
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
Future runEvery50SecondsUntilConditionMet() async {
|
||||
// Calculate the duration of the trip in minutes.
|
||||
double tripDurationInMinutes = duration1 / 60;
|
||||
int loopCount = tripDurationInMinutes.ceil();
|
||||
// If the trip duration is less than or equal to 50 minutes, then break the loop.
|
||||
for (var i = 0; i < loopCount; i++) {
|
||||
// Wait for 50 seconds.
|
||||
await Future.delayed(const Duration(
|
||||
seconds:
|
||||
50)); // Run the `getDriverCarsLocationToPassengerAfterApplied()` function.
|
||||
await getDriverCarsLocationToPassengerAfterApplied();
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
}
|
||||
|
||||
void reloadMarkerDriverCarsLocationToPassengerAfterApplied() {
|
||||
// Clear existing markers
|
||||
markers.clear();
|
||||
update();
|
||||
for (var i = 0; i < driverCarsLocationToPassengerAfterApplied.length; i++) {
|
||||
// }
|
||||
// for (var item in driverCarsLocationToPassengerAfterApplied) {
|
||||
final marker = Marker(
|
||||
infoWindow: InfoWindow(
|
||||
title:
|
||||
'${driverCarsLocationToPassengerAfterApplied[i].latitude} minutes'),
|
||||
markerId: MarkerId(
|
||||
datadriverCarsLocationToPassengerAfterApplied['message'][0]['id']
|
||||
.toString()),
|
||||
position: LatLng(driverCarsLocationToPassengerAfterApplied[i].latitude,
|
||||
driverCarsLocationToPassengerAfterApplied[i].longitude),
|
||||
);
|
||||
markers.add(marker);
|
||||
update();
|
||||
mapController?.animateCamera(CameraUpdate.newLatLng(LatLng(
|
||||
driverCarsLocationToPassengerAfterApplied[i].latitude,
|
||||
driverCarsLocationToPassengerAfterApplied[i].longitude)));
|
||||
update();
|
||||
} // Update the map with the new markers
|
||||
}
|
||||
|
||||
Future cancelRide() async {
|
||||
print(rideConfirm);
|
||||
|
||||
@@ -398,100 +503,6 @@ class MapController extends GetxController {
|
||||
update();
|
||||
}
|
||||
|
||||
Future getCarsLocationByPassenger() async {
|
||||
carsLocationByPassenger = [];
|
||||
LatLngBounds bounds =
|
||||
calculateBounds(mylocation.latitude, mylocation.longitude, 8000);
|
||||
print(
|
||||
'Southwest: ${bounds.southwest.latitude}, ${bounds.southwest.longitude}');
|
||||
print(
|
||||
'Northeast: ${bounds.northeast.latitude}, ${bounds.northeast.longitude}');
|
||||
|
||||
var res =
|
||||
await CRUD().get(link: AppLink.getCarsLocationByPassenger, payload: {
|
||||
'southwestLat': southwest.latitude.toString(),
|
||||
'southwestLon': southwest.longitude.toString(),
|
||||
'northeastLat': northeast.latitude.toString(),
|
||||
'northeastLon': northeast.longitude.toString(),
|
||||
});
|
||||
if (res == 'failure') {
|
||||
Get.defaultDialog(
|
||||
title: 'No Car in your site.Sorry!',
|
||||
middleText: '',
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Back',
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
markerReloadingTimer.cancel();
|
||||
}));
|
||||
} else {
|
||||
dataCarsLocationByPassenger = jsonDecode(res);
|
||||
// print(dataCarsLocationByPassenger);
|
||||
|
||||
for (var i = 0; i < dataCarsLocationByPassenger['message'].length; i++) {
|
||||
carsLocationByPassenger.add(LatLng(
|
||||
double.parse(dataCarsLocationByPassenger['message'][i]['latitude']),
|
||||
double.parse(
|
||||
dataCarsLocationByPassenger['message'][i]['longitude'])));
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Future getDriverCarsLocationToPassengerAfterApplied() async {
|
||||
driverCarsLocationToPassengerAfterApplied = [];
|
||||
|
||||
var res = await CRUD().get(
|
||||
link: AppLink.getDriverCarsLocationToPassengerAfterApplied,
|
||||
payload: {
|
||||
'driver_id': dataCarsLocationByPassenger['message'][0]['driver_id']
|
||||
});
|
||||
|
||||
datadriverCarsLocationToPassengerAfterApplied = jsonDecode(res);
|
||||
|
||||
driverCarsLocationToPassengerAfterApplied.add(LatLng(
|
||||
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||
['latitude']),
|
||||
double.parse(datadriverCarsLocationToPassengerAfterApplied['message'][0]
|
||||
['longitude'])));
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
Future runEvery50SecondsUntilConditionMet() async {
|
||||
// Calculate the duration of the trip in minutes.
|
||||
double tripDurationInMinutes = duration1 / 60;
|
||||
int loopCount = tripDurationInMinutes.ceil();
|
||||
// If the trip duration is less than or equal to 50 minutes, then break the loop.
|
||||
for (var i = 0; i < loopCount; i++) {
|
||||
// Wait for 50 seconds.
|
||||
await Future.delayed(const Duration(
|
||||
seconds:
|
||||
50)); // Run the `getDriverCarsLocationToPassengerAfterApplied()` function.
|
||||
await getDriverCarsLocationToPassengerAfterApplied();
|
||||
reloadMarkerDriverCarsLocationToPassengerAfterApplied();
|
||||
}
|
||||
}
|
||||
|
||||
void reloadMarkerDriverCarsLocationToPassengerAfterApplied() {
|
||||
// Clear existing markers
|
||||
markers.clear();
|
||||
|
||||
for (var item in driverCarsLocationToPassengerAfterApplied) {
|
||||
final marker = Marker(
|
||||
infoWindow: InfoWindow(title: '${item.latitude} minutes'),
|
||||
markerId: MarkerId(item.toString()),
|
||||
position: LatLng(item.latitude, item.longitude),
|
||||
);
|
||||
markers.add(marker);
|
||||
update();
|
||||
mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(LatLng(item.latitude, item.longitude)));
|
||||
update();
|
||||
} // Update the map with the new markers
|
||||
}
|
||||
|
||||
LatLngBounds calculateBounds(
|
||||
double centerLat, double centerLng, double radius) {
|
||||
// double radius = 4000; // 10 km in meters
|
||||
@@ -571,7 +582,10 @@ class MapController extends GetxController {
|
||||
}
|
||||
|
||||
String duratioByPassenger = '';
|
||||
late DateTime newTime1 = DateTime.now();
|
||||
String distanceByPassenger = '';
|
||||
late Duration durationfromDriverToPassenger;
|
||||
|
||||
void getNearestDriverByPassengerLocation() async {
|
||||
if (polylines.isEmpty || data.isEmpty) {
|
||||
double nearestDistance = double.infinity;
|
||||
@@ -607,6 +621,8 @@ class MapController extends GetxController {
|
||||
distanceByPassenger =
|
||||
data['rows'][0]['elements'][0]['distance']['text'];
|
||||
duration1 = data['rows'][0]['elements'][0]['duration']['value'];
|
||||
durationfromDriverToPassenger = Duration(seconds: duration1.toInt());
|
||||
newTime1 = currentTime.add(durationfromDriverToPassenger);
|
||||
duratioByPassenger =
|
||||
data['rows'][0]['elements'][0]['duration']['text'];
|
||||
|
||||
@@ -771,7 +787,7 @@ class MapController extends GetxController {
|
||||
late double cost = 0;
|
||||
late double distance = 0;
|
||||
late double duration = 0;
|
||||
DateTime currentTime = DateTime.now();
|
||||
|
||||
late Duration durationToAdd;
|
||||
late DateTime newTime = DateTime.now();
|
||||
Future bottomSheet() async {
|
||||
|
||||
@@ -44,32 +44,33 @@ class CreditCardController extends GetxController {
|
||||
@override
|
||||
void onInit() async {
|
||||
super.onInit();
|
||||
String? cardNumber = await SecureStorage().readData(BoxName.cardNumber);
|
||||
String? cardHolderName =
|
||||
await SecureStorage().readData(BoxName.cardHolderName);
|
||||
String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
||||
String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
||||
openPayment();
|
||||
// String? cardNumber = await SecureStorage().readData(BoxName.cardNumber);
|
||||
// String? cardHolderName =
|
||||
// await SecureStorage().readData(BoxName.cardHolderName);
|
||||
// String? expiryDate = await SecureStorage().readData(BoxName.expiryDate);
|
||||
// String? cvvCode = await SecureStorage().readData(BoxName.cvvCode);
|
||||
|
||||
print('cardNumber: $cardNumber');
|
||||
print('cardHolderName: $cardHolderName');
|
||||
print('expiryDate: $expiryDate');
|
||||
print('cvvCode: $cvvCode');
|
||||
// print('cardNumber: $cardNumber');
|
||||
// print('cardHolderName: $cardHolderName');
|
||||
// print('expiryDate: $expiryDate');
|
||||
// print('cvvCode: $cvvCode');
|
||||
|
||||
if (cvvCode != null && cvvCode.isNotEmpty) {
|
||||
final maskedCardNumber = DigitObscuringFormatter()
|
||||
.formatEditUpdate(
|
||||
TextEditingValue.empty,
|
||||
TextEditingValue(text: cardNumber ?? ''),
|
||||
)
|
||||
.text;
|
||||
// if (cvvCode != null && cvvCode.isNotEmpty) {
|
||||
// final maskedCardNumber = DigitObscuringFormatter()
|
||||
// .formatEditUpdate(
|
||||
// TextEditingValue.empty,
|
||||
// TextEditingValue(text: cardNumber ?? ''),
|
||||
// )
|
||||
// .text;
|
||||
|
||||
print('maskedCardNumber: $maskedCardNumber');
|
||||
// print('maskedCardNumber: $maskedCardNumber');
|
||||
|
||||
cardNumberController.text = maskedCardNumber;
|
||||
cardHolderNameController.text = cardHolderName ?? '';
|
||||
expiryDateController.text = expiryDate ?? '';
|
||||
cvvCodeController.text = cvvCode;
|
||||
}
|
||||
// cardNumberController.text = maskedCardNumber;
|
||||
// cardHolderNameController.text = cardHolderName ?? '';
|
||||
// expiryDateController.text = expiryDate ?? '';
|
||||
// cvvCodeController.text = cvvCode;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@ class MyApp extends StatelessWidget {
|
||||
? const MapPage()
|
||||
: box.read(BoxName.emailDriver) == null
|
||||
? LoginPage()
|
||||
: LoginCaptin());
|
||||
: box.read(BoxName.emailDriver) != null
|
||||
? const HomeCaptin()
|
||||
: LoginCaptin());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/credential.dart';
|
||||
import 'package:ride/constant/style.dart';
|
||||
|
||||
import '../../../controller/functions/locaton_controller.dart';
|
||||
@@ -23,21 +24,33 @@ class HomeCaptin extends StatelessWidget {
|
||||
),
|
||||
body: [
|
||||
GetBuilder<LocationController>(
|
||||
builder: (locationController) => Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${locationController.mylocation}',
|
||||
style: AppStyle.subtitle,
|
||||
builder: (locationController) => Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'${locationController.mylocation}',
|
||||
style: AppStyle.subtitle,
|
||||
),
|
||||
Text(
|
||||
'${DateTime.now()}',
|
||||
style: AppStyle.subtitle,
|
||||
)
|
||||
],
|
||||
),
|
||||
Text(
|
||||
'${DateTime.now()}',
|
||||
style: AppStyle.subtitle,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
MyClass().exampleUsage();
|
||||
},
|
||||
child: Text(
|
||||
"Text Button",
|
||||
),
|
||||
),
|
||||
],
|
||||
))
|
||||
],
|
||||
isleading: false);
|
||||
|
||||
@@ -286,7 +286,7 @@ class MapPage extends StatelessWidget {
|
||||
const CashConfirmPageShown(),
|
||||
const PaymentMethodPage(),
|
||||
timerForCancellTripFromPassenger(),
|
||||
const DriverTimeArrivePassenger(),
|
||||
const DriverTimeArrivePassengerPage(),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/map_page_controller.dart';
|
||||
import 'hexegone_clipper.dart';
|
||||
@@ -20,7 +19,7 @@ GetBuilder<MapController> hexagonClipper() {
|
||||
duration: const Duration(microseconds: 300),
|
||||
height: 250,
|
||||
width: 250,
|
||||
decoration: AppStyle.boxDecoration(),
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// gradient: const LinearGradient(
|
||||
// colors: [AppColor.greenColor, AppColor.secondaryColor],
|
||||
// begin: Alignment.topLeft,
|
||||
|
||||
@@ -5,8 +5,8 @@ import 'package:ride/views/home/map_widget.dart/hexegone_clipper.dart';
|
||||
import '../../../constant/style.dart';
|
||||
import '../../../controller/home/map_page_controller.dart';
|
||||
|
||||
class DriverTimeArrivePassenger extends StatelessWidget {
|
||||
const DriverTimeArrivePassenger({super.key});
|
||||
class DriverTimeArrivePassengerPage extends StatelessWidget {
|
||||
const DriverTimeArrivePassengerPage({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -23,15 +23,24 @@ class DriverTimeArrivePassenger extends StatelessWidget {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
Container(
|
||||
decoration: AppStyle.boxDecoration(),
|
||||
decoration: AppStyle.boxDecoration,
|
||||
// width: 50,
|
||||
// height: 50,
|
||||
child: Padding(
|
||||
padding: const EdgeInsetsDirectional.only(
|
||||
start: 5, end: 5),
|
||||
child: Text(
|
||||
controller.duratioByPassenger.toString(),
|
||||
style: AppStyle.title,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
controller.duratioByPassenger.toString() +
|
||||
' to arrive you.'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
Text(
|
||||
controller.newTime1.toString(),
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
))
|
||||
],
|
||||
|
||||
@@ -32,7 +32,7 @@ class MapMenuWidget extends StatelessWidget {
|
||||
opacity: 1, // Adjust the opacity value as needed
|
||||
child: AnimatedContainer(
|
||||
width: Get.width * .6,
|
||||
decoration: AppStyle.boxDecoration(),
|
||||
decoration: AppStyle.boxDecoration,
|
||||
transform: Matrix4.translationValues(
|
||||
controller.heightMenu * .1, 1, 1),
|
||||
curve: Curves.easeOutCubic,
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:ride/constant/box_name.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/views/widgets/elevated_btn.dart';
|
||||
|
||||
import '../../../constant/colors.dart';
|
||||
|
||||
@@ -12,7 +12,7 @@ import '../../../constant/box_name.dart';
|
||||
import '../../../constant/colors.dart';
|
||||
import '../../../constant/info.dart';
|
||||
import '../../../controller/functions/secure_storage.dart';
|
||||
import '../../../controller/home/payment/credit_card_Controller.dart';
|
||||
import '../../../controller/home/payment/credit_card_controller.dart';
|
||||
import '../../../main.dart';
|
||||
import '../../widgets/elevated_btn.dart';
|
||||
import '../map_widget.dart/payment_method.page.dart';
|
||||
|
||||
@@ -106,7 +106,7 @@ packages:
|
||||
source: hosted
|
||||
version: "1.0.5"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: crypto
|
||||
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||
|
||||
@@ -35,6 +35,7 @@ dependencies:
|
||||
geolocator: ^10.0.0
|
||||
flutter_paypal: ^0.2.0
|
||||
flutter_launcher_icons: ^0.13.1
|
||||
crypto: ^3.0.3
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
|
||||
Reference in New Issue
Block a user