12/31/1
This commit is contained in:
@@ -29,13 +29,13 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
||||
width: 2,
|
||||
)),
|
||||
suffixIcon: const Icon(Icons.search),
|
||||
hintText: 'Search for your destination'.tr,
|
||||
hintText: controller.hintTextDestinationPoint,
|
||||
hintStyle: AppStyle.title,
|
||||
hintMaxLines: 1,
|
||||
prefixIcon: IconButton(
|
||||
onPressed: () {
|
||||
controller.placeController.clear();
|
||||
controller.clearPlaces();
|
||||
controller.placeDestinationController.clear();
|
||||
controller.clearPlacesDestination();
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.clear,
|
||||
@@ -43,18 +43,19 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
||||
),
|
||||
),
|
||||
),
|
||||
controller: controller.placeController,
|
||||
controller: controller.placeDestinationController,
|
||||
onChanged: (value) {
|
||||
if (controller.placeController.text.length > 5) {
|
||||
if (controller.placeDestinationController.text.length >
|
||||
5) {
|
||||
controller.getPlaces();
|
||||
controller.changeHeight();
|
||||
controller.changeHeightPlaces();
|
||||
}
|
||||
},
|
||||
// onEditingComplete: () => controller.changeHeight(),
|
||||
),
|
||||
),
|
||||
),
|
||||
controller.places.isEmpty
|
||||
controller.placesDestination.isEmpty
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
controller.changeMainBottomMenuMap();
|
||||
@@ -68,37 +69,25 @@ GetBuilder<MapPassengerController> formSearchPlaces() {
|
||||
)
|
||||
: const SizedBox(),
|
||||
Container(
|
||||
height: controller.places.isNotEmpty ? controller.height : 0,
|
||||
height: controller.placesDestination.isNotEmpty
|
||||
? controller.height
|
||||
: 0,
|
||||
color: AppColor.secondaryColor,
|
||||
child: ListView.builder(
|
||||
itemCount: controller.places.length,
|
||||
itemCount: controller.placesDestination.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
var res = controller.places[index];
|
||||
var res = controller.placesDestination[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
controller.changeHeight();
|
||||
Get.defaultDialog(
|
||||
title:
|
||||
'${'Are You sure to ride to'.tr} ${res['name']}',
|
||||
middleText: '',
|
||||
titleStyle: AppStyle.title,
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Confirm'.tr,
|
||||
onPressed: () async {
|
||||
controller.clearPolyline();
|
||||
controller.data = [];
|
||||
await controller.getMap(
|
||||
'${controller.myLocation.latitude.toString()},${controller.myLocation.longitude.toString()}',
|
||||
"${res['geometry']['location']['lat']},${res['geometry']['location']['lng']}");
|
||||
controller.places = [];
|
||||
controller.placeController.clear();
|
||||
onTap: () async {
|
||||
controller.changeHeightPlaces();
|
||||
|
||||
controller.showBottomSheet1();
|
||||
Get.back();
|
||||
controller.showBottomSheet1();
|
||||
controller.changeMainBottomMenuMap();
|
||||
}),
|
||||
);
|
||||
controller.changeHeightPlaces();
|
||||
|
||||
controller.myLocation = controller.newMyLocation;
|
||||
controller.convertHintTextDestinationNewPlaces(index);
|
||||
|
||||
controller.placesDestination = [];
|
||||
controller.placeDestinationController.clear();
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
|
||||
Reference in New Issue
Block a user