This commit is contained in:
Hamza Aleghwairyeen
2024-04-12 23:06:59 +03:00
parent 766f930a30
commit 4e35874f2b
12 changed files with 177 additions and 110 deletions

View File

@@ -42,7 +42,8 @@ class MapPagePassenger extends StatelessWidget {
const MapMenuWidget(),
const MenuIconMapPageWidget(),
buttomSheetMapPage(),
CarDetailsTypeToChoose(), const Burc(),
CarDetailsTypeToChoose(),
const Burc(),
const ApplyOrderWidget(),
// hexagonClipper(),
const CancelRidePageShow(),

View File

@@ -422,7 +422,7 @@ class Burc extends StatelessWidget {
' in your'
.tr +
' ${AppInformation.appName}'
'\n wallet due to a previous trip.'
' wallet due to a previous trip.'
.tr,
textAlign: TextAlign.center,
style: AppStyle.subtitle,

View File

@@ -18,34 +18,42 @@ class PaymentHistoryPassengerPage extends StatelessWidget {
GetBuilder<PassengerWalletHistoryController>(
builder: (controller) => controller.isLoading
? const MyCircularProgressIndicator()
: ListView.builder(
itemCount: controller.archive.length,
itemBuilder: (BuildContext context, int index) {
var list = controller.archive[index];
return Padding(
padding: const EdgeInsets.all(4),
child: Container(
decoration: BoxDecoration(
color: double.parse(list['balance']) < 0
? AppColor.redColor.withOpacity(.4)
: AppColor.greenColor.withOpacity(.4)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
list['balance'],
style: AppStyle.title,
),
Text(
list['created_at'],
style: AppStyle.title,
),
],
),
: controller.archive.isEmpty
? Center(
child: Text(
'No wallet record found'.tr,
style: AppStyle.title,
),
);
},
),
)
: ListView.builder(
itemCount: controller.archive.length,
itemBuilder: (BuildContext context, int index) {
var list = controller.archive[index];
return Padding(
padding: const EdgeInsets.all(4),
child: Container(
decoration: BoxDecoration(
color: double.parse(list['balance']) < 0
? AppColor.redColor.withOpacity(.4)
: AppColor.greenColor.withOpacity(.4)),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
list['balance'],
style: AppStyle.title,
),
Text(
list['created_at'],
style: AppStyle.title,
),
],
),
),
);
},
),
)
],
isleading: true);

View File

@@ -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:get/get.dart';
import 'package:SEFER/constant/style.dart';
import 'package:SEFER/views/widgets/my_scafold.dart';
import 'package:SEFER/views/widgets/mycircular.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import '../../../constant/colors.dart';
import '../../../controller/functions/launch.dart';
@@ -23,80 +26,106 @@ class OrderHistory extends StatelessWidget {
GetBuilder<OrderHistoryController>(
builder: (orderHistoryController) => orderHistoryController.isloading
? const MyCircularProgressIndicator()
: ListView.builder(
itemCount:
orderHistoryController.orderHistoryListPassenger.length,
itemBuilder: (BuildContext context, int index) {
final rides =
orderHistoryController.orderHistoryListPassenger[index];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: 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)
]),
child: Padding(
: orderHistoryController.orderHistoryListPassenger.isEmpty
? Center(
child: Text(
'No trip yet found'.tr,
style: AppStyle.headTitle2,
),
)
: ListView.builder(
itemCount: orderHistoryController
.orderHistoryListPassenger.length,
itemBuilder: (BuildContext context, int index) {
final rides = orderHistoryController
.orderHistoryListPassenger[index];
return Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
InkWell(
onTap: () {
String mapUrl =
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
// print(mapUrl);
showInBrowser(mapUrl);
},
child: Text(
'Click here to Show it in Map'.tr,
style: AppStyle.title,
),
),
Column(
child: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
rides['date'],
style: AppStyle.subtitle,
InkWell(
onTap: () {
String mapUrl =
'https://www.google.com/maps/dir/${rides['start_location']}/${rides['end_location']}/';
// print(mapUrl);
showInBrowser(mapUrl);
},
child: SizedBox(
height: Get.height * .2,
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,
),
},
),
),
),
Text(
rides['time'],
style: AppStyle.subtitle,
),
Text(
rides['status'],
style: rides['status'] != 'Canceled'.tr
? AppStyle.subtitle.copyWith(
color: AppColor.greenColor)
: AppStyle.subtitle
.copyWith(color: AppColor.redColor),
),
Text(
'${'Price is'.tr} ${rides['price']}',
style: AppStyle.subtitle,
Column(
children: [
Text(
rides['date'],
style: AppStyle.subtitle,
),
Text(
rides['time'],
style: AppStyle.subtitle,
),
Text(
rides['status'],
style: rides['status'] != 'Canceled'.tr
? AppStyle.subtitle.copyWith(
color: AppColor.greenColor)
: AppStyle.subtitle.copyWith(
color: AppColor.redColor),
),
Text(
'${'Price is'.tr} ${rides['price']}',
style: AppStyle.subtitle,
),
],
),
],
),
],
),
),
),
),
);
},
),
);
},
),
)
],
);

View File

@@ -1,3 +1,5 @@
import 'package:SEFER/constant/box_name.dart';
import 'package:SEFER/main.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/style.dart';
@@ -25,25 +27,34 @@ class TaarifPage extends StatelessWidget {
// decoration: AppStyle.boxDecoration,
children: [
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(
children: [
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(
children: [
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(
children: [
Text('0.05 ${'JOD'.tr}/min and 0.21 ${'JOD'.tr}/km',
style: AppStyle.title),
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),
Text('Including Tax'.tr, style: AppStyle.title),
],
),
@@ -52,7 +63,7 @@ class TaarifPage extends StatelessWidget {
const SizedBox(height: 10),
Text('BookingFee'.tr, style: AppStyle.headTitle2),
const SizedBox(height: 10),
Text('4.17%', style: AppStyle.title),
Text('10%', style: AppStyle.title),
const SizedBox(height: 20),
Text('Morning'.tr, style: AppStyle.headTitle2),
const SizedBox(height: 10),