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