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.
|
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
|
||||||
minSdk = 23
|
minSdk = 23
|
||||||
targetSdk = flutter.targetSdkVersion
|
targetSdk = flutter.targetSdkVersion
|
||||||
versionCode = 111
|
versionCode = 112
|
||||||
versionName = '1.6.111'
|
versionName = '1.6.112'
|
||||||
multiDexEnabled =true
|
multiDexEnabled =true
|
||||||
|
|
||||||
// manifestPlaceholders can be specified here if needed
|
// manifestPlaceholders can be specified here if needed
|
||||||
|
|||||||
@@ -41,11 +41,11 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>80</string>
|
<string>82</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>4.3.80</string>
|
<string>4.3.82</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string></string>
|
<string></string>
|
||||||
<key>FirebaseAppDelegateProxyEnabled</key>
|
<key>FirebaseAppDelegateProxyEnabled</key>
|
||||||
|
|||||||
@@ -125,10 +125,10 @@ class FirebaseMessagesController extends GetxController {
|
|||||||
notificationController.showNotification(
|
notificationController.showNotification(
|
||||||
'Order', message.notification!.body!, 'Order');
|
'Order', message.notification!.body!, 'Order');
|
||||||
}
|
}
|
||||||
} else if (message.notification!.title! == 'Accepted Ride') {
|
} else if (message.notification!.title! == 'Accepted Ride'.tr) {
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
notificationController.showNotification(
|
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'];
|
var passengerList = message.data['passengerList'];
|
||||||
|
|
||||||
|
|||||||
@@ -1956,8 +1956,8 @@ class MapPassengerController extends GetxController {
|
|||||||
final body = constructNotificationBody(driverData);
|
final body = constructNotificationBody(driverData);
|
||||||
// Log.print('body:ww ${body}');
|
// Log.print('body:ww ${body}');
|
||||||
FirebaseMessagesController().sendNotificationToDriverMAP(
|
FirebaseMessagesController().sendNotificationToDriverMAP(
|
||||||
'OrderSpeed',
|
'Order'.tr,
|
||||||
rideId,
|
endNameAddress,
|
||||||
driverData['token'].toString(),
|
driverData['token'].toString(),
|
||||||
body,
|
body,
|
||||||
'order.wav');
|
'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(MapPassengerController());
|
||||||
Get.put(MyMenuController());
|
Get.put(MyMenuController());
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
// checkForUpdate(context);
|
checkForUpdate(context);
|
||||||
});
|
});
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
|
bottom: false,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
GoogleMapPassengerWidget(),
|
GoogleMapPassengerWidget(),
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class CarDetailsTypeToChoose extends StatelessWidget {
|
|||||||
mapPassengerController.isBottomSheetShown &&
|
mapPassengerController.isBottomSheetShown &&
|
||||||
mapPassengerController.rideConfirm == false
|
mapPassengerController.rideConfirm == false
|
||||||
? Positioned(
|
? Positioned(
|
||||||
bottom: 15,
|
bottom: 30,
|
||||||
left: 8,
|
left: 8,
|
||||||
right: 8,
|
right: 8,
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -487,23 +487,29 @@ class PromoCode extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.defaultDialog(
|
Get.defaultDialog(
|
||||||
title: 'Apply Promo Code'.tr, // More engaging title
|
titlePadding:
|
||||||
content: Padding(
|
const EdgeInsets.only(top: 20, bottom: 10),
|
||||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
contentPadding: const EdgeInsets.symmetric(
|
||||||
child: Form(
|
horizontal: 20, vertical: 15),
|
||||||
|
title: 'Apply Promo Code'.tr,
|
||||||
|
titleStyle: Get.textTheme
|
||||||
|
.headlineMedium, // Make title more prominent
|
||||||
|
content: Form(
|
||||||
key: mapPassengerController.promoFormKey,
|
key: mapPassengerController.promoFormKey,
|
||||||
child: MyTextForm(
|
child: Column(
|
||||||
|
children: [
|
||||||
|
MyTextForm(
|
||||||
controller: mapPassengerController.promo,
|
controller: mapPassengerController.promo,
|
||||||
label: 'Promo Code'.tr, // Shortened label
|
label: 'Promo Code'.tr,
|
||||||
hint: 'Enter your promo code'
|
hint: 'Enter your promo code'.tr,
|
||||||
.tr, // More friendly hint
|
type: TextInputType.text,
|
||||||
type: TextInputType.name,
|
|
||||||
// style: AppStyle.normalTextBlack, // Apply consistent style
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 16), // Add some spacing
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
confirm: MyElevatedButton(
|
confirm: MyElevatedButton(
|
||||||
title: 'Apply'.tr, // Shortened button title
|
title: 'Apply'.tr,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (mapPassengerController
|
if (mapPassengerController
|
||||||
.promoFormKey.currentState!
|
.promoFormKey.currentState!
|
||||||
@@ -518,6 +524,10 @@ class PromoCode extends StatelessWidget {
|
|||||||
onPressed: () => Get.back(),
|
onPressed: () => Get.back(),
|
||||||
child: Text('Cancel'.tr),
|
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(
|
child: Container(
|
||||||
|
|||||||
@@ -14,115 +14,96 @@ GetBuilder<MapPassengerController> leftMainMenuIcons() {
|
|||||||
return GetBuilder<MapPassengerController>(
|
return GetBuilder<MapPassengerController>(
|
||||||
builder: (controller) => Positioned(
|
builder: (controller) => Positioned(
|
||||||
top: Get.height * .008,
|
top: Get.height * .008,
|
||||||
left: Get.width * .2,
|
left: Get.width * .02, // Adjust left position for better spacing
|
||||||
child: Builder(builder: (context) {
|
child: Row(
|
||||||
return Row(
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceAround, // Distribute space evenly
|
||||||
children: [
|
children: [
|
||||||
AnimatedContainer(
|
_buildIconButtonWithAnimation(
|
||||||
duration: const Duration(microseconds: 200),
|
controller: controller,
|
||||||
width: controller.widthMapTypeAndTraffic,
|
icon: Icons.satellite_alt,
|
||||||
decoration: BoxDecoration(
|
onPressed: () => controller.changeMapType(),
|
||||||
border: Border.all(),
|
tooltip: 'Toggle Map Type', // Add tooltips for better UX
|
||||||
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,
|
|
||||||
),
|
),
|
||||||
|
const SizedBox(width: 8), // Consistent spacing
|
||||||
|
_buildIconButtonWithAnimation(
|
||||||
|
controller: controller,
|
||||||
|
icon: Icons.streetview_sharp,
|
||||||
|
onPressed: () => controller.changeMapTraffic(),
|
||||||
|
tooltip: 'Toggle Traffic',
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(width: 8),
|
||||||
const SizedBox(
|
_buildIconButtonWithAnimation(
|
||||||
width: 5,
|
controller: controller,
|
||||||
),
|
icon: Icons.location_on,
|
||||||
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: () {
|
onPressed: () {
|
||||||
controller.mapController?.animateCamera(
|
controller.mapController?.animateCamera(
|
||||||
CameraUpdate.newLatLng(LatLng(
|
CameraUpdate.newLatLng(
|
||||||
|
LatLng(
|
||||||
controller.passengerLocation.latitude,
|
controller.passengerLocation.latitude,
|
||||||
controller.passengerLocation.longitude)));
|
controller.passengerLocation.longitude,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(
|
tooltip: 'Go to My Location',
|
||||||
Icons.location_on,
|
|
||||||
size: 29,
|
|
||||||
),
|
),
|
||||||
|
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),
|
||||||
const SizedBox(
|
// _buildIconButtonWithAnimation(
|
||||||
width: 5,
|
// controller: controller,
|
||||||
),
|
// icon: Octicons.telescope,
|
||||||
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 {
|
// onPressed: () async {
|
||||||
// final result = await sql.getCustomQuery('''
|
// final result = await sql.getCustomQuery('''
|
||||||
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
|
// SELECT * FROM ${TableName.recentLocations} ORDER BY createdAt DESC
|
||||||
// ''');
|
// ''');
|
||||||
// },
|
// },
|
||||||
// icon: const Icon(
|
// tooltip: 'Recent Locations', // More descriptive tooltip
|
||||||
// Octicons
|
|
||||||
// .telescope, // Replace this with your desired VIP icon
|
|
||||||
// size: 29,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
// ),
|
||||||
],
|
],
|
||||||
);
|
),
|
||||||
})),
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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());
|
Get.put(MapPassengerController());
|
||||||
return GetBuilder<MapPassengerController>(
|
return GetBuilder<MapPassengerController>(
|
||||||
builder: (controller) => Positioned(
|
builder: (controller) => Positioned(
|
||||||
bottom: 16, // Increased bottom padding
|
bottom: Get.height * .04, // Increased bottom padding
|
||||||
left: 16,
|
left: 16,
|
||||||
right: 16,
|
right: 16,
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
@@ -104,16 +104,17 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 12),
|
const SizedBox(height: 8),
|
||||||
if (controller.recentPlaces.isNotEmpty)
|
if (controller.recentPlaces.isNotEmpty)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text('Recent Places'.tr, style: AppStyle.subtitle),
|
// Text('Recent Places'.tr, style: AppStyle.subtitle),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 60,
|
height: 30,
|
||||||
|
child: Center(
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
itemCount: controller.recentPlaces.length,
|
itemCount: controller.recentPlaces.length,
|
||||||
@@ -124,6 +125,7 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
controller, context, index),
|
controller, context, index),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -308,23 +310,17 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Chip(
|
child: Container(
|
||||||
label: Text(controller.recentPlaces[index]['name'],
|
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)),
|
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,10 +459,10 @@ class MainBottomMenuMap extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Text('${'Where to'.tr} ${box.read(BoxName.name)}',
|
Text('${'Where to'.tr} ${box.read(BoxName.name)}',
|
||||||
style: AppStyle.subtitle),
|
style: AppStyle.subtitle),
|
||||||
if (controller.noCarString)
|
// if (controller.noCarString)
|
||||||
Text('Nearest Car: ~'.tr,
|
// Text('Nearest Car: ~'.tr,
|
||||||
style: TextStyle(color: Colors.grey.shade600))
|
// style: TextStyle(color: Colors.grey.shade600))
|
||||||
else
|
// else
|
||||||
Text(
|
Text(
|
||||||
controller.nearestCar != null
|
controller.nearestCar != null
|
||||||
? 'Nearest Car: ${controller.nearestDistance.toStringAsFixed(0)} m'
|
? 'Nearest Car: ${controller.nearestDistance.toStringAsFixed(0)} m'
|
||||||
|
|||||||
Reference in New Issue
Block a user