3/27/5
This commit is contained in:
@@ -115,6 +115,9 @@ class MapPassengerController extends GetxController {
|
||||
bool startLocationFromMap3 = false;
|
||||
bool startLocationFromMap4 = false;
|
||||
List startLocationFromMapAll = [];
|
||||
double latePrice = 0;
|
||||
double heavyPrice = 0;
|
||||
double naturePrice = 0;
|
||||
bool heightMenuBool = false;
|
||||
bool isPickerShown = false;
|
||||
bool isPointsPageForRider = false;
|
||||
@@ -2144,18 +2147,18 @@ class MapPassengerController extends GetxController {
|
||||
|
||||
update();
|
||||
if (currentTime.hour >= 22 && currentTime.hour < 5) {
|
||||
costDistance = distance * 3.9;
|
||||
costDistance = distance * latePrice;
|
||||
update();
|
||||
} else if (currentTime.hour >= 13 && currentTime.hour <= 16) {
|
||||
if (averageDuration > 2.5) {
|
||||
costDistance = distance * 4;
|
||||
costDistance = distance * heavyPrice;
|
||||
update();
|
||||
} else {
|
||||
costDistance = distance * 3.5;
|
||||
costDistance = distance * naturePrice;
|
||||
update();
|
||||
}
|
||||
} else {
|
||||
costDistance = distance * 3.4;
|
||||
costDistance = distance * (naturePrice - .1);
|
||||
update();
|
||||
}
|
||||
//print('cost $cost');
|
||||
@@ -2295,8 +2298,9 @@ class MapPassengerController extends GetxController {
|
||||
var res = await CRUD().get(link: AppLink.getKazanPercent);
|
||||
if (res != 'failure') {
|
||||
kazan = double.parse(jsonDecode(res)['message'][0]['kazan']);
|
||||
print(res);
|
||||
print(kazan);
|
||||
naturePrice = double.parse(jsonDecode(res)['message'][0]['naturePrice']);
|
||||
heavyPrice = double.parse(jsonDecode(res)['message'][0]['heavyPrice']);
|
||||
latePrice = double.parse(jsonDecode(res)['message'][0]['latePrice']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:SEFER/controller/home/captin/home_captain_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
import 'package:SEFER/controller/firebase/firbase_messge.dart';
|
||||
@@ -193,9 +194,10 @@ class OrderRequestPage extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: Get.height * .15,
|
||||
height: Get.height * .15,width: Get.width*.9,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
@@ -203,6 +205,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_up,
|
||||
@@ -211,9 +214,9 @@ class OrderRequestPage extends StatelessWidget {
|
||||
Text(
|
||||
myList[12] +
|
||||
' ' +
|
||||
'KM'.tr +
|
||||
' ${myList[11]} ' +
|
||||
'm'.tr,
|
||||
|
||||
' (${myList[11]}) '
|
||||
,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
@@ -226,36 +229,38 @@ class OrderRequestPage extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(
|
||||
Column(
|
||||
children: [
|
||||
Column(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.arrow_circle_down,
|
||||
color: AppColor.redColor,
|
||||
Icons.arrow_circle_up,
|
||||
color: AppColor.greenColor,
|
||||
),
|
||||
Text(
|
||||
myList[5] +
|
||||
' ' +
|
||||
'KM'.tr +
|
||||
' ${myList[11]} ' +
|
||||
'm'.tr,
|
||||
|
||||
' (${myList[4]}) '
|
||||
,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
myList[30] + ' ' + 'KM'.tr,
|
||||
myList[30],
|
||||
style: AppStyle.title,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
@@ -263,9 +268,9 @@ class OrderRequestPage extends StatelessWidget {
|
||||
child: RichText(
|
||||
text: TextSpan(
|
||||
text: 'Passenger Name is '.tr,
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.subtitle,
|
||||
children: [
|
||||
TextSpan(text: myList[8], style: AppStyle.headTitle2),
|
||||
TextSpan(text: myList[8], style: AppStyle.title),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -380,7 +385,7 @@ class OrderRequestPage extends StatelessWidget {
|
||||
// print(bodyToPassenger);
|
||||
FirebaseMessagesController()
|
||||
.sendNotificationToPassengerToken(
|
||||
'Apply Ride','your ride is applied'.tr,
|
||||
'Apply Ride', 'your ride is applied'.tr,
|
||||
// arguments['DriverList'][9].toString(),
|
||||
arguments['DriverList'][9].toString(),
|
||||
// box.read(BoxName.tokenDriver).toString(),
|
||||
|
||||
@@ -165,7 +165,9 @@ class GoogleMapPassengerWidget extends StatelessWidget {
|
||||
// anchor: const Offset(4, 4),
|
||||
position: carLocation,
|
||||
icon: controller.carIcon,
|
||||
rotation: controller.headingList,
|
||||
rotation: double.parse(controller
|
||||
.datadriverCarsLocationToPassengerAfterApplied[
|
||||
'message'][0]['latitude']),
|
||||
markerId: MarkerId(carLocation.toString())),
|
||||
for (int i = 1;
|
||||
i < controller.coordinatesWithoutEmpty.length - 1;
|
||||
|
||||
Reference in New Issue
Block a user