4/12/7
This commit is contained in:
@@ -14,8 +14,8 @@ class AppLink {
|
|||||||
static String addTokensDriver = "$server/ride/firebase/addDriver.php";
|
static String addTokensDriver = "$server/ride/firebase/addDriver.php";
|
||||||
|
|
||||||
//=======================Wallet===================
|
//=======================Wallet===================
|
||||||
static String wallet = '$server/ride/passengerWallet/';
|
static String wallet = '$server/ride/passengerWallet';
|
||||||
static String walletDriver = '$server/ride/driverWallet/';
|
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";
|
||||||
|
|||||||
@@ -173,6 +173,7 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
} else if (message.notification!.title! == 'RideIsBegin') {
|
} else if (message.notification!.title! == 'RideIsBegin') {
|
||||||
Get.find<MapPassengerController>().getBeginRideFromDriver();
|
Get.find<MapPassengerController>().getBeginRideFromDriver();
|
||||||
// Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
// Get.snackbar('RideIsBegin', '', backgroundColor: AppColor.greenColor);
|
||||||
|
box.write(BoxName.passengerWalletTotal, '0');
|
||||||
NotificationController()
|
NotificationController()
|
||||||
.showNotification('Trip is Begin'.tr, ''.tr, 'start');
|
.showNotification('Trip is Begin'.tr, ''.tr, 'start');
|
||||||
update();
|
update();
|
||||||
|
|||||||
@@ -481,6 +481,7 @@ class MapDriverController extends GetxController {
|
|||||||
});
|
});
|
||||||
print('passengerWalletBurc aft ${double.parse(passengerWalletBurc)}');
|
print('passengerWalletBurc aft ${double.parse(passengerWalletBurc)}');
|
||||||
}
|
}
|
||||||
|
|
||||||
double pointsSubstraction = 0;
|
double pointsSubstraction = 0;
|
||||||
pointsSubstraction = double.parse(paymentAmount) *
|
pointsSubstraction = double.parse(paymentAmount) *
|
||||||
(-1) *
|
(-1) *
|
||||||
|
|||||||
@@ -668,6 +668,7 @@ class MapPassengerController extends GetxController {
|
|||||||
rideTimerBegin = false;
|
rideTimerBegin = false;
|
||||||
box.write(BoxName.arrivalTime, '');
|
box.write(BoxName.arrivalTime, '');
|
||||||
remainingTimeTimerRideBegin = 0;
|
remainingTimeTimerRideBegin = 0;
|
||||||
|
box.write(BoxName.passengerWalletTotal, '0');
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class OrderHistoryController extends GetxController {
|
|||||||
'passenger_id': box.read(BoxName.passengerID).toString(),
|
'passenger_id': box.read(BoxName.passengerID).toString(),
|
||||||
});
|
});
|
||||||
if (res.toString() == 'failure') {
|
if (res.toString() == 'failure') {
|
||||||
Get.snackbar('failure', 'message');
|
// Get.snackbar('failure', 'message');
|
||||||
isloading = false;
|
isloading = false;
|
||||||
update();
|
update();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -440,6 +440,7 @@ class MyTranslation extends Translations {
|
|||||||
'Submit Question': "طرح السؤال",
|
'Submit Question': "طرح السؤال",
|
||||||
'Please enter your Question.': "الرجاء إدخال سؤالك.",
|
'Please enter your Question.': "الرجاء إدخال سؤالك.",
|
||||||
'Help Details': "تفاصيل المساعدة",
|
'Help Details': "تفاصيل المساعدة",
|
||||||
|
'No trip yet found': 'لم يتم حجز أي رحلة بعد ',
|
||||||
'No Response yet.': "لا يوجد رد بعد.",
|
'No Response yet.': "لا يوجد رد بعد.",
|
||||||
' You Earn today is ': " ما حصلت عليه اليوم هو",
|
' You Earn today is ': " ما حصلت عليه اليوم هو",
|
||||||
' You Have in': "لديك في",
|
' You Have in': "لديك في",
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:SEFER/constant/style.dart';
|
||||||
|
import 'package:SEFER/views/widgets/elevated_btn.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/box_name.dart';
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
import 'package:SEFER/constant/links.dart';
|
import 'package:SEFER/constant/links.dart';
|
||||||
@@ -16,11 +18,23 @@ class PassengerWalletHistoryController extends GetxController {
|
|||||||
var res = await CRUD().get(
|
var res = await CRUD().get(
|
||||||
link: AppLink.getPassengerWalletArchive,
|
link: AppLink.getPassengerWalletArchive,
|
||||||
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
payload: {'passenger_id': box.read(BoxName.passengerID)});
|
||||||
|
if (res != 'failure') {
|
||||||
archive = jsonDecode(res)['message'];
|
archive = jsonDecode(res)['message'];
|
||||||
print(archive);
|
print(archive);
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
update();
|
update();
|
||||||
|
} else {}
|
||||||
|
Get.defaultDialog(
|
||||||
|
barrierDismissible: false,
|
||||||
|
title: 'No wallet record found'.tr,
|
||||||
|
titleStyle: AppStyle.title,
|
||||||
|
middleText: '',
|
||||||
|
confirm: MyElevatedButton(
|
||||||
|
title: 'OK'.tr,
|
||||||
|
onPressed: () {
|
||||||
|
Get.back();
|
||||||
|
Get.back();
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ class MapPagePassenger extends StatelessWidget {
|
|||||||
const MapMenuWidget(),
|
const MapMenuWidget(),
|
||||||
const MenuIconMapPageWidget(),
|
const MenuIconMapPageWidget(),
|
||||||
buttomSheetMapPage(),
|
buttomSheetMapPage(),
|
||||||
CarDetailsTypeToChoose(), const Burc(),
|
CarDetailsTypeToChoose(),
|
||||||
|
const Burc(),
|
||||||
const ApplyOrderWidget(),
|
const ApplyOrderWidget(),
|
||||||
// hexagonClipper(),
|
// hexagonClipper(),
|
||||||
const CancelRidePageShow(),
|
const CancelRidePageShow(),
|
||||||
|
|||||||
@@ -422,7 +422,7 @@ class Burc extends StatelessWidget {
|
|||||||
' in your'
|
' in your'
|
||||||
.tr +
|
.tr +
|
||||||
' ${AppInformation.appName}'
|
' ${AppInformation.appName}'
|
||||||
'\n wallet due to a previous trip.'
|
' wallet due to a previous trip.'
|
||||||
.tr,
|
.tr,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: AppStyle.subtitle,
|
style: AppStyle.subtitle,
|
||||||
|
|||||||
@@ -18,6 +18,13 @@ class PaymentHistoryPassengerPage extends StatelessWidget {
|
|||||||
GetBuilder<PassengerWalletHistoryController>(
|
GetBuilder<PassengerWalletHistoryController>(
|
||||||
builder: (controller) => controller.isLoading
|
builder: (controller) => controller.isLoading
|
||||||
? const MyCircularProgressIndicator()
|
? const MyCircularProgressIndicator()
|
||||||
|
: controller.archive.isEmpty
|
||||||
|
? Center(
|
||||||
|
child: Text(
|
||||||
|
'No wallet record found'.tr,
|
||||||
|
style: AppStyle.title,
|
||||||
|
),
|
||||||
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
itemCount: controller.archive.length,
|
itemCount: controller.archive.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
@@ -30,7 +37,8 @@ class PaymentHistoryPassengerPage extends StatelessWidget {
|
|||||||
? AppColor.redColor.withOpacity(.4)
|
? AppColor.redColor.withOpacity(.4)
|
||||||
: AppColor.greenColor.withOpacity(.4)),
|
: AppColor.greenColor.withOpacity(.4)),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
list['balance'],
|
list['balance'],
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
import 'package:SEFER/controller/home/map_passenger_controller.dart';
|
||||||
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/style.dart';
|
import 'package:SEFER/constant/style.dart';
|
||||||
import 'package:SEFER/views/widgets/my_scafold.dart';
|
import 'package:SEFER/views/widgets/my_scafold.dart';
|
||||||
import 'package:SEFER/views/widgets/mycircular.dart';
|
import 'package:SEFER/views/widgets/mycircular.dart';
|
||||||
|
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||||
|
|
||||||
import '../../../constant/colors.dart';
|
import '../../../constant/colors.dart';
|
||||||
import '../../../controller/functions/launch.dart';
|
import '../../../controller/functions/launch.dart';
|
||||||
@@ -23,36 +26,28 @@ class OrderHistory extends StatelessWidget {
|
|||||||
GetBuilder<OrderHistoryController>(
|
GetBuilder<OrderHistoryController>(
|
||||||
builder: (orderHistoryController) => orderHistoryController.isloading
|
builder: (orderHistoryController) => orderHistoryController.isloading
|
||||||
? const MyCircularProgressIndicator()
|
? const MyCircularProgressIndicator()
|
||||||
|
: orderHistoryController.orderHistoryListPassenger.isEmpty
|
||||||
|
? Center(
|
||||||
|
child: Text(
|
||||||
|
'No trip yet found'.tr,
|
||||||
|
style: AppStyle.headTitle2,
|
||||||
|
),
|
||||||
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
itemCount:
|
itemCount: orderHistoryController
|
||||||
orderHistoryController.orderHistoryListPassenger.length,
|
.orderHistoryListPassenger.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
final rides =
|
final rides = orderHistoryController
|
||||||
orderHistoryController.orderHistoryListPassenger[index];
|
.orderHistoryListPassenger[index];
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: const BoxDecoration(
|
decoration: AppStyle.boxDecoration1,
|
||||||
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)
|
|
||||||
]),
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
@@ -61,9 +56,43 @@ class OrderHistory extends StatelessWidget {
|
|||||||
// print(mapUrl);
|
// print(mapUrl);
|
||||||
showInBrowser(mapUrl);
|
showInBrowser(mapUrl);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: SizedBox(
|
||||||
'Click here to Show it in Map'.tr,
|
height: Get.height * .2,
|
||||||
style: AppStyle.title,
|
width: Get.width * .75,
|
||||||
|
child: GoogleMap(
|
||||||
|
initialCameraPosition: CameraPosition(
|
||||||
|
target: Get.find<
|
||||||
|
MapPassengerController>()
|
||||||
|
.passengerLocation, // Assuming passenger location is available
|
||||||
|
zoom: 15,
|
||||||
|
),
|
||||||
|
polylines: {
|
||||||
|
Polyline(
|
||||||
|
zIndex: 2,
|
||||||
|
consumeTapEvents: true,
|
||||||
|
geodesic: true,
|
||||||
|
endCap: Cap.buttCap,
|
||||||
|
startCap: Cap.buttCap,
|
||||||
|
visible: true,
|
||||||
|
polylineId:
|
||||||
|
const PolylineId('route'),
|
||||||
|
points: [
|
||||||
|
LatLng(
|
||||||
|
rides['start_location']
|
||||||
|
['latitude'],
|
||||||
|
rides['start_location']
|
||||||
|
['longitude']),
|
||||||
|
LatLng(
|
||||||
|
rides['end_location']
|
||||||
|
['latitude'],
|
||||||
|
rides['end_location']
|
||||||
|
['longitude']),
|
||||||
|
],
|
||||||
|
color: AppColor.primaryColor,
|
||||||
|
width: 5,
|
||||||
|
),
|
||||||
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Column(
|
Column(
|
||||||
@@ -81,8 +110,8 @@ class OrderHistory extends StatelessWidget {
|
|||||||
style: rides['status'] != 'Canceled'.tr
|
style: rides['status'] != 'Canceled'.tr
|
||||||
? AppStyle.subtitle.copyWith(
|
? AppStyle.subtitle.copyWith(
|
||||||
color: AppColor.greenColor)
|
color: AppColor.greenColor)
|
||||||
: AppStyle.subtitle
|
: AppStyle.subtitle.copyWith(
|
||||||
.copyWith(color: AppColor.redColor),
|
color: AppColor.redColor),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${'Price is'.tr} ${rides['price']}',
|
'${'Price is'.tr} ${rides['price']}',
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import 'package:SEFER/constant/box_name.dart';
|
||||||
|
import 'package:SEFER/main.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:SEFER/constant/style.dart';
|
import 'package:SEFER/constant/style.dart';
|
||||||
@@ -25,24 +27,33 @@ class TaarifPage extends StatelessWidget {
|
|||||||
// decoration: AppStyle.boxDecoration,
|
// decoration: AppStyle.boxDecoration,
|
||||||
children: [
|
children: [
|
||||||
Text('Minimum fare'.tr, style: AppStyle.title),
|
Text('Minimum fare'.tr, style: AppStyle.title),
|
||||||
Text('1 ${'JOD'.tr}', style: AppStyle.title),
|
box.read(BoxName.countryCode) == 'Jordan'
|
||||||
|
? Text('1 ${'JOD'.tr}', style: AppStyle.title)
|
||||||
|
: Text('20 ${'LE'.tr}', style: AppStyle.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TableRow(
|
TableRow(
|
||||||
children: [
|
children: [
|
||||||
Text('Maximum fare'.tr, style: AppStyle.title),
|
Text('Maximum fare'.tr, style: AppStyle.title),
|
||||||
Text('200 ${'JOD'.tr}', style: AppStyle.title),
|
box.read(BoxName.countryCode) == 'Jordan'
|
||||||
|
? Text('200 ${'JOD'.tr}', style: AppStyle.title)
|
||||||
|
: Text('15000 ${'LE'.tr}', style: AppStyle.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TableRow(
|
TableRow(
|
||||||
children: [
|
children: [
|
||||||
Text('Flag-down fee'.tr, style: AppStyle.title),
|
Text('Flag-down fee'.tr, style: AppStyle.title),
|
||||||
Text('0.47 ${'JOD'.tr}', style: AppStyle.title),
|
box.read(BoxName.countryCode) == 'Jordan'
|
||||||
|
? Text('0.47 ${'JOD'.tr}', style: AppStyle.title)
|
||||||
|
: Text('15 ${'LE'.tr}', style: AppStyle.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TableRow(
|
TableRow(
|
||||||
children: [
|
children: [
|
||||||
Text('0.05 ${'JOD'.tr}/min and 0.21 ${'JOD'.tr}/km',
|
box.read(BoxName.countryCode) == 'Jordan'
|
||||||
|
? Text('0.05 ${'JOD'.tr}/min and 0.21 ${'JOD'.tr}/km',
|
||||||
|
style: AppStyle.title)
|
||||||
|
: Text('1 ${'LE'.tr}/min and 4 ${'LE'.tr}/km',
|
||||||
style: AppStyle.title),
|
style: AppStyle.title),
|
||||||
Text('Including Tax'.tr, style: AppStyle.title),
|
Text('Including Tax'.tr, style: AppStyle.title),
|
||||||
],
|
],
|
||||||
@@ -52,7 +63,7 @@ class TaarifPage extends StatelessWidget {
|
|||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text('BookingFee'.tr, style: AppStyle.headTitle2),
|
Text('BookingFee'.tr, style: AppStyle.headTitle2),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
Text('4.17%', style: AppStyle.title),
|
Text('10%', style: AppStyle.title),
|
||||||
const SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
Text('Morning'.tr, style: AppStyle.headTitle2),
|
Text('Morning'.tr, style: AppStyle.headTitle2),
|
||||||
const SizedBox(height: 10),
|
const SizedBox(height: 10),
|
||||||
|
|||||||
Reference in New Issue
Block a user