24-12/31/1
This commit is contained in:
@@ -26,7 +26,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
Get.put(MapPassengerController());
|
||||
return GetBuilder<MapPassengerController>(
|
||||
builder: (controller) => Positioned(
|
||||
bottom: 16, // Increased bottom padding
|
||||
bottom: Get.height * .04, // Increased bottom padding
|
||||
left: 16,
|
||||
right: 16,
|
||||
child: GestureDetector(
|
||||
@@ -104,24 +104,26 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
const SizedBox(height: 8),
|
||||
if (controller.recentPlaces.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('Recent Places'.tr, style: AppStyle.subtitle),
|
||||
// Text('Recent Places'.tr, style: AppStyle.subtitle),
|
||||
SizedBox(
|
||||
height: 60,
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: controller.recentPlaces.length,
|
||||
separatorBuilder: (context, index) =>
|
||||
const SizedBox(width: 8),
|
||||
itemBuilder: (context, index) =>
|
||||
_buildRecentPlaceButton(
|
||||
controller, context, index),
|
||||
height: 30,
|
||||
child: Center(
|
||||
child: ListView.separated(
|
||||
scrollDirection: Axis.horizontal,
|
||||
itemCount: controller.recentPlaces.length,
|
||||
separatorBuilder: (context, index) =>
|
||||
const SizedBox(width: 8),
|
||||
itemBuilder: (context, index) =>
|
||||
_buildRecentPlaceButton(
|
||||
controller, context, index),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -308,23 +310,17 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Chip(
|
||||
label: Text(controller.recentPlaces[index]['name'],
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primaryColor.withOpacity(0.05), // Subtle background
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
color: AppColor.primaryColor.withOpacity(0.1), width: 1),
|
||||
),
|
||||
),
|
||||
child: Text(controller.recentPlaces[index]['name'],
|
||||
style: const TextStyle(fontSize: 14)),
|
||||
onDeleted: () {
|
||||
MyDialog().getDialog(
|
||||
"Are you sure to delete this location?".tr,
|
||||
'',
|
||||
() {
|
||||
sql.deleteData(TableName.recentLocations,
|
||||
controller.recentPlaces[index]['id']);
|
||||
controller.getFavioratePlaces();
|
||||
controller.update();
|
||||
Get.back();
|
||||
mySnackbarSuccess('deleted'.tr);
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -463,16 +459,16 @@ class MainBottomMenuMap extends StatelessWidget {
|
||||
children: [
|
||||
Text('${'Where to'.tr} ${box.read(BoxName.name)}',
|
||||
style: AppStyle.subtitle),
|
||||
if (controller.noCarString)
|
||||
Text('Nearest Car: ~'.tr,
|
||||
style: TextStyle(color: Colors.grey.shade600))
|
||||
else
|
||||
Text(
|
||||
controller.nearestCar != null
|
||||
? 'Nearest Car: ${controller.nearestDistance.toStringAsFixed(0)} m'
|
||||
: 'No cars nearby'.tr,
|
||||
style: TextStyle(color: Colors.grey.shade600),
|
||||
),
|
||||
// if (controller.noCarString)
|
||||
// Text('Nearest Car: ~'.tr,
|
||||
// style: TextStyle(color: Colors.grey.shade600))
|
||||
// else
|
||||
Text(
|
||||
controller.nearestCar != null
|
||||
? 'Nearest Car: ${controller.nearestDistance.toStringAsFixed(0)} m'
|
||||
: 'No cars nearby'.tr,
|
||||
style: TextStyle(color: Colors.grey.shade600),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user