6/27/1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:SEFER/constant/box_name.dart';
|
||||
@@ -12,6 +13,7 @@ import '../../../constant/colors.dart';
|
||||
import '../../../constant/table_names.dart';
|
||||
import '../../../controller/functions/toast.dart';
|
||||
import '../../../controller/functions/tts.dart';
|
||||
import 'form_search_start.dart';
|
||||
|
||||
class MainBottomMenuMap extends StatelessWidget {
|
||||
const MainBottomMenuMap({super.key});
|
||||
@@ -43,9 +45,28 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
child: Container(
|
||||
width: Get.width * .8,
|
||||
height: Get.height * .1,
|
||||
decoration: AppStyle.boxDecoration1,
|
||||
decoration: const BoxDecoration(
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color.fromARGB(
|
||||
255, 237, 230, 230),
|
||||
blurRadius: 5,
|
||||
offset: Offset(2, 4)),
|
||||
BoxShadow(
|
||||
color: Color.fromARGB(
|
||||
255, 242, 237, 237),
|
||||
blurRadius: 5,
|
||||
offset: Offset(-2, -2))
|
||||
],
|
||||
color: AppColor.blueColor,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.elliptical(15, 30),
|
||||
),
|
||||
),
|
||||
// decoration: AppStyle.boxDecoration1,
|
||||
child: DefaultTextStyle(
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.secondaryColor),
|
||||
child: Center(
|
||||
child: controller.isPickerShown
|
||||
? clickPointPosition(
|
||||
@@ -62,6 +83,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
icon: controller.isMainBottomMenuMap
|
||||
? const Icon(
|
||||
Icons.ads_click,
|
||||
color: AppColor.secondaryColor,
|
||||
size: 35,
|
||||
)
|
||||
: const Icon(
|
||||
@@ -88,10 +110,9 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? const SizedBox()
|
||||
: Column(
|
||||
children: [
|
||||
// controller.currentLocationToFormPlaces
|
||||
// ? const SizedBox()
|
||||
// :
|
||||
// formSearchPlacesStart(),
|
||||
!controller.isAnotherOreder
|
||||
? const SizedBox()
|
||||
: formSearchPlacesStart(),
|
||||
formSearchPlacesDestenation(),
|
||||
const SizedBox(
|
||||
height: 10,
|
||||
@@ -117,16 +138,81 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
// controller.showBottomSheet1();
|
||||
// }),
|
||||
//todo If you want add stop click here
|
||||
// TextButton(
|
||||
// onPressed: () {
|
||||
// controller.changeMainBottomMenuMap();
|
||||
// controller.changeWayPointSheet();
|
||||
// },
|
||||
// child: Text(
|
||||
// "If you want add stop click here".tr,
|
||||
// style: AppStyle.title,
|
||||
// ),
|
||||
// ),
|
||||
|
||||
CupertinoButton(
|
||||
child: Text(
|
||||
!controller.isAnotherOreder
|
||||
? 'I want to order for someone else'
|
||||
.tr
|
||||
: 'I want to order for myself'.tr,
|
||||
),
|
||||
onPressed: () {
|
||||
showCupertinoModalPopup(
|
||||
context: context,
|
||||
builder: (BuildContext context) =>
|
||||
CupertinoActionSheet(
|
||||
title: Text('Select Order Type'.tr),
|
||||
message: Text(
|
||||
'Choose who this order is for'
|
||||
.tr),
|
||||
actions: <Widget>[
|
||||
CupertinoActionSheetAction(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
CupertinoIcons.person,
|
||||
color: CupertinoColors
|
||||
.activeBlue),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
'I want to order for myself'
|
||||
.tr),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
controller
|
||||
.changeisAnotherOreder(
|
||||
false);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
CupertinoIcons.person_2,
|
||||
color: CupertinoColors
|
||||
.activeBlue),
|
||||
const SizedBox(width: 15),
|
||||
Text(
|
||||
'I want to order for someone else'
|
||||
.tr),
|
||||
],
|
||||
),
|
||||
onPressed: () {
|
||||
controller
|
||||
.changeisAnotherOreder(
|
||||
true);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
cancelButton:
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: true,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Text('Cancel'.tr),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
@@ -199,6 +285,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
onPressed: () async {
|
||||
controller.clearPolyline();
|
||||
controller.data = [];
|
||||
//todo add isAnothorOrder
|
||||
if (controller.passengerStartLocationFromMap == true) {
|
||||
controller.newMyLocation = controller.newStartPointLocation;
|
||||
controller.changeMainBottomMenuMap();
|
||||
@@ -253,21 +340,24 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
controller.changeMainBottomMenuMap();
|
||||
controller.passengerStartLocationFromMap = true;
|
||||
controller.isPickerShown = true;
|
||||
await controller.mapController?.animateCamera(CameraUpdate.newLatLng(
|
||||
LatLng(controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
Get.defaultDialog(
|
||||
title: 'Destination selected'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Text(
|
||||
'Now select start pick'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
if (controller.isAnotherOreder == false) {
|
||||
await controller.mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(LatLng(
|
||||
controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
Get.defaultDialog(
|
||||
title: 'Destination selected'.tr,
|
||||
titleStyle: AppStyle.title,
|
||||
content: Text(
|
||||
'Now select start pick'.tr,
|
||||
style: AppStyle.title,
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'OK'.tr,
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
}));
|
||||
} else {}
|
||||
}
|
||||
|
||||
controller.placesDestination = [];
|
||||
@@ -289,6 +379,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? const Icon(
|
||||
Icons.arrow_circle_up_rounded,
|
||||
size: 35,
|
||||
color: AppColor.secondaryColor,
|
||||
)
|
||||
: const Icon(
|
||||
Icons.arrow_circle_down_rounded,
|
||||
@@ -300,7 +391,10 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
? 'Pick or Tap to confirm'.tr
|
||||
// ? 'Pick your ride location on the map - Tap to confirm'.tr
|
||||
: "Click here point".tr,
|
||||
style: AppStyle.title,
|
||||
style: AppStyle.title.copyWith(
|
||||
color: AppColor.secondaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -318,6 +412,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
icon: controller.isMainBottomMenuMap
|
||||
? const Icon(
|
||||
Icons.ads_click,
|
||||
color: AppColor.secondaryColor,
|
||||
size: 35,
|
||||
)
|
||||
: const Icon(
|
||||
|
||||
Reference in New Issue
Block a user