24-12/31/1
This commit is contained in:
@@ -61,8 +61,8 @@ android {
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||
minSdk = 23
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
versionCode = 111
|
||||
versionName = '1.6.111'
|
||||
versionCode = 112
|
||||
versionName = '1.6.112'
|
||||
multiDexEnabled =true
|
||||
|
||||
// manifestPlaceholders can be specified here if needed
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>80</string>
|
||||
<string>82</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>4.3.80</string>
|
||||
<string>4.3.82</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||
|
||||
@@ -125,10 +125,10 @@ class FirebaseMessagesController extends GetxController {
|
||||
notificationController.showNotification(
|
||||
'Order', message.notification!.body!, 'Order');
|
||||
}
|
||||
} else if (message.notification!.title! == 'Accepted Ride') {
|
||||
} else if (message.notification!.title! == 'Accepted Ride'.tr) {
|
||||
if (Platform.isAndroid) {
|
||||
notificationController.showNotification(
|
||||
'Apply Order'.tr, 'Driver Applied the Ride for You'.tr, 'ding');
|
||||
'Accepted Ride'.tr, 'Driver Accepted the Ride for You'.tr, 'ding');
|
||||
}
|
||||
var passengerList = message.data['passengerList'];
|
||||
|
||||
|
||||
@@ -1956,8 +1956,8 @@ class MapPassengerController extends GetxController {
|
||||
final body = constructNotificationBody(driverData);
|
||||
// Log.print('body:ww ${body}');
|
||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||
'OrderSpeed',
|
||||
rideId,
|
||||
'Order'.tr,
|
||||
endNameAddress,
|
||||
driverData['token'].toString(),
|
||||
body,
|
||||
'order.wav');
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -33,11 +33,12 @@ class MapPagePassenger extends StatelessWidget {
|
||||
Get.put(MapPassengerController());
|
||||
Get.put(MyMenuController());
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
// checkForUpdate(context);
|
||||
checkForUpdate(context);
|
||||
});
|
||||
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
bottom: false,
|
||||
child: Stack(
|
||||
children: [
|
||||
GoogleMapPassengerWidget(),
|
||||
|
||||
@@ -102,7 +102,7 @@ class CarDetailsTypeToChoose extends StatelessWidget {
|
||||
mapPassengerController.isBottomSheetShown &&
|
||||
mapPassengerController.rideConfirm == false
|
||||
? Positioned(
|
||||
bottom: 15,
|
||||
bottom: 30,
|
||||
left: 8,
|
||||
right: 8,
|
||||
child: Container(
|
||||
@@ -487,23 +487,29 @@ class PromoCode extends StatelessWidget {
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Get.defaultDialog(
|
||||
title: 'Apply Promo Code'.tr, // More engaging title
|
||||
content: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
child: Form(
|
||||
key: mapPassengerController.promoFormKey,
|
||||
child: MyTextForm(
|
||||
controller: mapPassengerController.promo,
|
||||
label: 'Promo Code'.tr, // Shortened label
|
||||
hint: 'Enter your promo code'
|
||||
.tr, // More friendly hint
|
||||
type: TextInputType.name,
|
||||
// style: AppStyle.normalTextBlack, // Apply consistent style
|
||||
),
|
||||
titlePadding:
|
||||
const EdgeInsets.only(top: 20, bottom: 10),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 20, vertical: 15),
|
||||
title: 'Apply Promo Code'.tr,
|
||||
titleStyle: Get.textTheme
|
||||
.headlineMedium, // Make title more prominent
|
||||
content: Form(
|
||||
key: mapPassengerController.promoFormKey,
|
||||
child: Column(
|
||||
children: [
|
||||
MyTextForm(
|
||||
controller: mapPassengerController.promo,
|
||||
label: 'Promo Code'.tr,
|
||||
hint: 'Enter your promo code'.tr,
|
||||
type: TextInputType.text,
|
||||
),
|
||||
const SizedBox(height: 16), // Add some spacing
|
||||
],
|
||||
),
|
||||
),
|
||||
confirm: MyElevatedButton(
|
||||
title: 'Apply'.tr, // Shortened button title
|
||||
title: 'Apply'.tr,
|
||||
onPressed: () {
|
||||
if (mapPassengerController
|
||||
.promoFormKey.currentState!
|
||||
@@ -518,6 +524,10 @@ class PromoCode extends StatelessWidget {
|
||||
onPressed: () => Get.back(),
|
||||
child: Text('Cancel'.tr),
|
||||
),
|
||||
// Customize the shape and background color for a better look
|
||||
backgroundColor: Theme.of(context)
|
||||
.cardColor, // Use card color for consistency
|
||||
radius: 10,
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
|
||||
@@ -13,116 +13,97 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
||||
Get.put(TextToSpeechController());
|
||||
return GetBuilder<MapPassengerController>(
|
||||
builder: (controller) => Positioned(
|
||||
top: Get.height * .008,
|
||||
left: Get.width * .2,
|
||||
child: Builder(builder: (context) {
|
||||
return Row(
|
||||
children: [
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(),
|
||||
color: AppColor.secondaryColor,
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
controller.changeMapType();
|
||||
// Toast.show(context, 'This is a toast message!');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.satellite_alt,
|
||||
size: 29,
|
||||
top: Get.height * .008,
|
||||
left: Get.width * .02, // Adjust left position for better spacing
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceAround, // Distribute space evenly
|
||||
children: [
|
||||
_buildIconButtonWithAnimation(
|
||||
controller: controller,
|
||||
icon: Icons.satellite_alt,
|
||||
onPressed: () => controller.changeMapType(),
|
||||
tooltip: 'Toggle Map Type', // Add tooltips for better UX
|
||||
),
|
||||
const SizedBox(width: 8), // Consistent spacing
|
||||
_buildIconButtonWithAnimation(
|
||||
controller: controller,
|
||||
icon: Icons.streetview_sharp,
|
||||
onPressed: () => controller.changeMapTraffic(),
|
||||
tooltip: 'Toggle Traffic',
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildIconButtonWithAnimation(
|
||||
controller: controller,
|
||||
icon: Icons.location_on,
|
||||
onPressed: () {
|
||||
controller.mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(
|
||||
LatLng(
|
||||
controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
controller.changeMapTraffic();
|
||||
// Toast.show(context, 'This is a toast message!');
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.streetview_sharp,
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
// if (Platform.isIOS)
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () {
|
||||
controller.mapController?.animateCamera(
|
||||
CameraUpdate.newLatLng(LatLng(
|
||||
controller.passengerLocation.latitude,
|
||||
controller.passengerLocation.longitude)));
|
||||
},
|
||||
icon: const Icon(
|
||||
Icons.location_on,
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
AnimatedContainer(
|
||||
duration: const Duration(microseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.secondaryColor,
|
||||
border: Border.all(),
|
||||
borderRadius: BorderRadius.circular(15)),
|
||||
child: IconButton(
|
||||
onPressed: () async {
|
||||
Get.to(() => VipWaittingPage());
|
||||
},
|
||||
icon: const Icon(
|
||||
Octicons.watch, // Replace this with your desired VIP icon
|
||||
size: 29,
|
||||
),
|
||||
),
|
||||
),
|
||||
// AnimatedContainer(
|
||||
// duration: const Duration(microseconds: 200),
|
||||
// width: controller.widthMapTypeAndTraffic,
|
||||
// decoration: BoxDecoration(
|
||||
// color: AppColor.secondaryColor,
|
||||
// border: Border.all(),
|
||||
// borderRadius: BorderRadius.circular(15)),
|
||||
// child: IconButton(
|
||||
// onPressed: () async {
|
||||
// final result = await sql.getCustomQuery('''
|
||||
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
|
||||
// ''');
|
||||
// },
|
||||
// icon: const Icon(
|
||||
// Octicons
|
||||
// .telescope, // Replace this with your desired VIP icon
|
||||
// size: 29,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
);
|
||||
})),
|
||||
);
|
||||
},
|
||||
tooltip: 'Go to My Location',
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
_buildIconButtonWithAnimation(
|
||||
controller: controller,
|
||||
icon: Octicons.watch,
|
||||
onPressed: () => Get.to(() => VipWaittingPage()),
|
||||
tooltip: 'VIP Waiting Page', // More descriptive tooltip
|
||||
),
|
||||
// const SizedBox(width: 8),
|
||||
// _buildIconButtonWithAnimation(
|
||||
// controller: controller,
|
||||
// icon: Octicons.telescope,
|
||||
// onPressed: () async {
|
||||
// final result = await sql.getCustomQuery('''
|
||||
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
|
||||
// ''');
|
||||
// },
|
||||
// tooltip: 'Recent Locations', // More descriptive tooltip
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildIconButtonWithAnimation({
|
||||
required MapPassengerController controller,
|
||||
required IconData icon,
|
||||
required VoidCallback onPressed,
|
||||
String? tooltip,
|
||||
}) {
|
||||
return AnimatedContainer(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
width: controller.widthMapTypeAndTraffic,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.primaryColor,
|
||||
border: Border.all(color: Colors.grey.shade400), // More subtle border
|
||||
borderRadius: BorderRadius.circular(12), // Slightly less rounded
|
||||
boxShadow: [
|
||||
// Add a subtle shadow for depth
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
spreadRadius: 0.5,
|
||||
blurRadius: 3,
|
||||
offset: const Offset(0, 1),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: IconButton(
|
||||
onPressed: onPressed,
|
||||
icon: Icon(
|
||||
icon,
|
||||
size: 24, // Slightly smaller icon for a cleaner look
|
||||
color: Colors.white, // Ensure good contrast
|
||||
),
|
||||
tooltip: tooltip,
|
||||
splashRadius: 24, // Adjust splash radius for better feedback
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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