diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8e567a0..1121885 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -46,7 +46,7 @@ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index c18ca62..4db8057 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png deleted file mode 100644 index 328a8d4..0000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png index 0edd7e3..c4efae6 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png deleted file mode 100644 index 0edd7e3..0000000 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png new file mode 100644 index 0000000..c514656 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png new file mode 100644 index 0000000..2c35d1c Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png new file mode 100644 index 0000000..44892be Binary files /dev/null and b/android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index b4f1709..ff032c6 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png deleted file mode 100644 index 3d14d2d..0000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png index 13a4c4f..e659390 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png deleted file mode 100644 index 13a4c4f..0000000 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png new file mode 100644 index 0000000..b52b03b Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 3cb9936..fc6063d 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png deleted file mode 100644 index e7f70bb..0000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png index ac80499..ccf837d 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png deleted file mode 100644 index ac80499..0000000 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png new file mode 100644 index 0000000..6265150 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index 0ad321f..8f64f98 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png deleted file mode 100644 index e1a9322..0000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png index 0f79dc8..f9f903b 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png deleted file mode 100644 index 0f79dc8..0000000 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png new file mode 100644 index 0000000..1a70683 Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 89b8d05..0000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png deleted file mode 100644 index 2ffee54..0000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index d3a6e5b..0000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png deleted file mode 100644 index d3a6e5b..0000000 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png and /dev/null differ diff --git a/assets/translations/en_En.json b/assets/translations/en_En.json index 0bb5a6f..d662fc6 100644 --- a/assets/translations/en_En.json +++ b/assets/translations/en_En.json @@ -30,21 +30,40 @@ "verify": "Verify", "useYourMobileNumber": "Use your mobile number to Log in easily and securely.", "sendCode":"Send Code", - "forgotPassword": "Forgot Password", - "login": "Log in", - "emailAddress": "Email Address*", - "password": "Password*", - "enterPassword": "Enter password", - "forgotPassword": "Forgot Password", - "login": "Log in", - "emailAddress": "Email Address*", - "password": "Password*", - "enterPassword": "Enter password", - "forgotPassword": "Forgot Password", - "login": "Log in", - "emailAddress": "Email Address*", - "password": "Password*", - "enterPassword": "Enter password", - "forgotPassword": "Forgot Password", - "login": "Log in" + "serviceIsUnavailable": "Service is unavailable at the selected address.", + "pickUpLocation": "Pickup Location", + "destinationLocation": "Destination Location", + "continueT":"Continue", + "plsSelectSourceLocation": "Please select source location", + "plsSelectDestinationLocations": "Please select destination location", + "selectVehicleType": "Select Your Vehicle Type", + "plsSelectVehicleTypeFirst": "Please select a vehicle type first.", + "plsSelectPaymentMethod": "Please select a payment method", + "insufficientWallet": "Insufficient wallet balance. Please select another payment method.", + "promoCode": "Promo code", + "thisOfferNotEligible": "This offer not eligible for this booking", + "viewAll": "View All", + "writeCoupon": "Write coupon Code", + "redeemNow": "Redeem now", + "plsEnterCouponCode":"Please enter a coupon code", + "couponApplied": "Coupon applied successfully", + "couponExpired": "This coupon code has been expired", + "invalidCouponCode": "Invalid coupon code", + "orderSummary": "Order Summary", + "subtotal": "Subtotal", + "discount": "Discount", + "orderTotal": "Order Total", + "confirmBooking": "Confirm Booking", + "waitingForDriver": "Waiting for driver....", + "cancelRide": "Cancel Ride", + "riderCancelledSucces": "Ride cancelled successfully", + "failedToCancel": "Failed to cancel ride", + "pleaseWait": "Please wait...", + "change": "Change", + "yourSosRequest": "Your SOS request has been submitted to admin", + "yourSosrequestAlreadySubmitted": "Your SOS request is already submitted", + "payNow": "Pay Now", + "youDoNothaveSufficientwalletBalance": "You do not have sufficient wallet balance", + "somethingWentWrong": "Something went wrong, please contact admin.", + "cash": "Cash" } \ No newline at end of file diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index b6fcdcb..566a602 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -40,7 +40,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Customer + Fondex CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/lib/constant/const_texts.dart b/lib/constant/const_texts.dart index 13a93fb..2693203 100644 --- a/lib/constant/const_texts.dart +++ b/lib/constant/const_texts.dart @@ -29,11 +29,41 @@ class ConstTexts { static String verify = "verify"; static String useYourMobileNumber = "useYourMobileNumber"; static String sendCode = "sendCode"; - static String loginToExplore = "logintoExplore"; - static String emailAddress = "emailAddress"; - static String password = "password"; - static String loginToExplore = "logintoExplore"; - static String emailAddress = "emailAddress"; - static String password = "password"; + static String serviceIsUnavailable = "serviceIsUnavailable"; + static String pickUpLocation = "pickUpLocation"; + static String destinationLocation = "destinationLocation"; + static String continueT = "continue"; + static String plsSelectSourceLocation = "plsSelectSourceLocation"; + static String plsSelectDestinationLocations = "plsSelectDestinationLocations"; + static String selectVehicleType = "selectVehicleType"; + static String plsSelectVehicleTypeFirst = "plsSelectVehicleTypeFirst"; + static String plsSelectPaymentMethod = "plsSelectPaymentMethod"; + static String insufficientWallet = "insufficientWallet"; + static String promoCode = "promoCode"; + static String thisOfferNotEligible = "thisOfferNotEligible"; + static String viewAll = "viewAll"; + static String writeCoupon = "writeCoupon"; + static String redeemNow = "redeemNow"; + static String plsEnterCouponCode = "plsEnterCouponCode"; + static String couponApplied = "couponApplied"; + static String couponExpired = "couponExpired"; + static String invalidCouponCode = "invalidCouponCode"; + static String orderSummary = "orderSummary"; + static String subtotal = "subtotal"; + static String discount = "discount"; + static String orderTotal = "orderTotal"; + static String confirmBooking = "confirmBooking"; + static String waitingForDriver = "waitingForDriver"; + static String cancelRide = "cancelRide"; + static String riderCancelledSucces = "riderCancelledSucces"; + static String failedToCancel = "failedToCancel"; + static String pleaseWait = "pleaseWait"; + static String change = "change"; + static String yourSosRequest = "yourSosRequest"; + static String yourSosrequestAlreadySubmitted = "yourSosrequestAlreadySubmitted"; + static String payNow = "payNow"; + static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance"; + static String somethingWentWrong = "somethingWentWrong"; + static String cash = "cash"; } diff --git a/lib/screen_ui/cab_service_screens/cab_booking_screen.dart b/lib/screen_ui/cab_service_screens/cab_booking_screen.dart index 5a8f5b1..0df9bdd 100644 --- a/lib/screen_ui/cab_service_screens/cab_booking_screen.dart +++ b/lib/screen_ui/cab_service_screens/cab_booking_screen.dart @@ -1,5 +1,6 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; +import 'package:customer/constant/const_texts.dart'; import 'package:customer/models/coupon_model.dart'; import 'package:customer/models/tax_model.dart'; import 'package:customer/models/vehicle_type.dart'; @@ -13,6 +14,7 @@ import 'package:customer/themes/round_button_border.dart'; import 'package:customer/utils/network_image_widget.dart'; import 'package:customer/utils/utils.dart'; import 'package:dotted_border/dotted_border.dart'; +import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_svg/flutter_svg.dart'; @@ -284,8 +286,7 @@ class CabBookingScreen extends StatelessWidget { controller.setDepartureMarker(lat, lng); } else { ShowToastDialog.showToast( - "Service is unavailable at the selected address." - .tr, + ConstTexts.serviceIsUnavailable.tr(), ); } } @@ -318,8 +319,7 @@ class CabBookingScreen extends StatelessWidget { ); } else { ShowToastDialog.showToast( - "Service is unavailable at the selected address." - .tr, + ConstTexts.serviceIsUnavailable.tr(), ); } } @@ -330,7 +330,7 @@ class CabBookingScreen extends StatelessWidget { controller: controller.sourceTextEditController.value, // backgroundColor: AppThemeData.cardColor, - hintText: "Pickup Location".tr, + hintText: ConstTexts.pickUpLocation.tr(), enable: false, prefix: Padding( padding: EdgeInsets.only(left: 10, right: 10), @@ -394,7 +394,7 @@ class CabBookingScreen extends StatelessWidget { .value, // backgroundColor: AppThemeData.grey50, // borderColor: AppThemeData.grey50, - hintText: "Destination Location".tr, + hintText: ConstTexts.destinationLocation.tr(), // backgroundColor: AppThemeData.cardColor, enable: false, prefix: const Padding( @@ -431,7 +431,7 @@ class CabBookingScreen extends StatelessWidget { SizedBox(height: 15), RoundedButtonFill( borderRadius: 10.r, - title: "Continue".tr, + title: ConstTexts.continueT.tr(), onPress: () { if (controller .sourceTextEditController @@ -439,7 +439,7 @@ class CabBookingScreen extends StatelessWidget { .text .isEmpty) { ShowToastDialog.showToast( - "Please select source location".tr, + ConstTexts.plsSelectSourceLocation.tr(), ); } else if (controller .destinationTextEditController @@ -447,7 +447,7 @@ class CabBookingScreen extends StatelessWidget { .text .isEmpty) { ShowToastDialog.showToast( - "Please select destination location".tr, + ConstTexts.plsSelectDestinationLocations.tr(), ); } else { controller.bottomSheetType.value = "vehicleSelection"; @@ -506,7 +506,7 @@ class CabBookingScreen extends StatelessWidget { Padding( padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r), child: Text( - "Select Your Vehicle Type", + ConstTexts.selectVehicleType.tr(), style: AppThemeData.boldTextStyle( fontSize: 18.sp, color: @@ -689,7 +689,7 @@ class CabBookingScreen extends StatelessWidget { controller.bottomSheetType.value = "payment"; } else { ShowToastDialog.showToast( - "Please select a vehicle type first.".tr, + ConstTexts.plsSelectVehicleTypeFirst.tr(), ); } }, @@ -909,13 +909,13 @@ class CabBookingScreen extends StatelessWidget { ), RoundedButtonFill( borderRadius: 10.r, - title: "Continue".tr, + title: ConstTexts.continueT.tr(), color: AppThemeData.mainColor, textColor: AppThemeData.grey50, onPress: () async { if (controller.selectedPaymentMethod.value.isEmpty) { ShowToastDialog.showToast( - "Please select a payment method".tr, + ConstTexts.plsSelectPaymentMethod.tr(), ); return; } @@ -924,8 +924,7 @@ class CabBookingScreen extends StatelessWidget { controller.userModel.value.walletAmount ?? 0; if (walletAmount <= 0) { ShowToastDialog.showToast( - "Insufficient wallet balance. Please select another payment method." - .tr, + ConstTexts.insufficientWallet.tr(), ); return; } @@ -1064,7 +1063,8 @@ class CabBookingScreen extends StatelessWidget { controller .sourceTextEditController .value, - hintText: "Pickup Location".tr, + hintText: + ConstTexts.pickUpLocation.tr(), enable: false, prefix: const Padding( padding: EdgeInsets.only( @@ -1146,7 +1146,9 @@ class CabBookingScreen extends StatelessWidget { .value, // backgroundColor: AppThemeData.grey50, // borderColor: AppThemeData.grey50, - hintText: "Destination Location".tr, + hintText: + ConstTexts.destinationLocation + .tr(), enable: false, prefix: const Padding( padding: EdgeInsets.only( @@ -1193,7 +1195,7 @@ class CabBookingScreen extends StatelessWidget { children: [ Expanded( child: Text( - "Promo code".tr, + ConstTexts.promoCode.tr(), style: AppThemeData.boldTextStyle( fontSize: 16, color: @@ -1227,15 +1229,15 @@ class CabBookingScreen extends StatelessWidget { controller.calculateTotalAmount(); } else { ShowToastDialog.showToast( - "This offer not eligible for this booking" - .tr, + ConstTexts.thisOfferNotEligible + .tr(), ); } } }); }, child: Text( - "View All".tr, + ConstTexts.viewAll.tr(), style: AppThemeData.boldTextStyle( decoration: TextDecoration.underline, fontSize: 14, @@ -1296,7 +1298,7 @@ class CabBookingScreen extends StatelessWidget { decoration: InputDecoration( border: InputBorder.none, hintText: - 'Write coupon Code'.tr, + ConstTexts.writeCoupon.tr(), contentPadding: EdgeInsets.only( bottom: 10, ), @@ -1313,7 +1315,7 @@ class CabBookingScreen extends StatelessWidget { ), RoundedButtonFill( borderRadius: 10.r, - title: "Redeem now".tr, + title: ConstTexts.redeemNow.tr(), width: 27.w, fontSizes: 14, onPress: () async { @@ -1324,7 +1326,8 @@ class CabBookingScreen extends StatelessWidget { .trim() .isEmpty) { ShowToastDialog.showToast( - "Please enter a coupon code".tr, + ConstTexts.plsEnterCouponCode + .tr(), ); return; } @@ -1376,25 +1379,26 @@ class CabBookingScreen extends StatelessWidget { controller .calculateTotalAmount(); ShowToastDialog.showToast( - "Coupon applied successfully" - .tr, + ConstTexts.couponApplied + .tr(), ); controller.update(); } else { ShowToastDialog.showToast( - "This offer not eligible for this booking" - .tr, + ConstTexts + .thisOfferNotEligible + .tr(), ); } } else { ShowToastDialog.showToast( - "This coupon code has been expired" - .tr, + ConstTexts.couponExpired.tr(), ); } } else { ShowToastDialog.showToast( - "Invalid coupon code".tr, + ConstTexts.invalidCouponCode + .tr(), ); } }, @@ -1427,7 +1431,7 @@ class CabBookingScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Order Summary".tr, + ConstTexts.orderSummary.tr(), style: AppThemeData.boldTextStyle( fontSize: 14, color: @@ -1447,7 +1451,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Subtotal".tr, + ConstTexts.subtotal.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -1485,7 +1489,7 @@ class CabBookingScreen extends StatelessWidget { Row( children: [ Text( - "Discount".tr, + ConstTexts.discount.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, @@ -1547,8 +1551,7 @@ class CabBookingScreen extends StatelessWidget { children: [ Expanded( child: Text( - '${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})' - .tr, + '${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})', textAlign: TextAlign.start, style: AppThemeData.mediumTextStyle( @@ -1576,7 +1579,7 @@ class CabBookingScreen extends StatelessWidget { .toString(), taxModel: taxModel, ).toString(), - ).tr, + ), textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle( @@ -1605,7 +1608,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Order Total".tr, + ConstTexts.orderTotal.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -1781,10 +1784,8 @@ class CabBookingScreen extends StatelessWidget { controller.selectedPaymentMethod.value == "cod" ? "Наличными" - : controller - .selectedPaymentMethod - .value - .tr, + : controller.selectedPaymentMethod.value + .tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle( fontSize: 16, @@ -1802,7 +1803,7 @@ class CabBookingScreen extends StatelessWidget { ), RoundedButtonFill( borderRadius: 10.r, - title: "Confirm Booking".tr, + title: ConstTexts.confirmBooking.tr(), onPress: () async { controller.placeOrder(); }, @@ -1858,7 +1859,7 @@ class CabBookingScreen extends StatelessWidget { ), SizedBox(height: 30), Text( - "Waiting for driver....".tr, + ConstTexts.waitingForDriver.tr(), style: AppThemeData.boldTextStyle( fontSize: 18.sp, color: @@ -1870,7 +1871,7 @@ class CabBookingScreen extends StatelessWidget { Image.asset('assets/loader.gif', width: 250), RoundedButtonFill( borderRadius: 10.r, - title: "Cancel Ride".tr, + title: ConstTexts.cancelRide.tr(), color: AppThemeData.mainColor, textColor: AppThemeData.surface, onPress: () async { @@ -1917,7 +1918,7 @@ class CabBookingScreen extends StatelessWidget { await FireStoreUtils.updateUser(Constant.userModel!); } ShowToastDialog.showToast( - "Ride cancelled successfully".tr, + ConstTexts.riderCancelledSucces.tr(), ); // Get.offAll(const CabDashboardScreen()); Get.back(); @@ -1926,7 +1927,7 @@ class CabBookingScreen extends StatelessWidget { ); cabDashboardController.selectedIndex.value = 0; } catch (e) { - ShowToastDialog.showToast("Failed to cancel ride".tr); + ShowToastDialog.showToast(ConstTexts.failedToCancel.tr()); } }, ), @@ -2021,7 +2022,7 @@ class CabBookingScreen extends StatelessWidget { controller .sourceTextEditController .value, - hintText: "Pickup Location".tr, + hintText: ConstTexts.pickUpLocation.tr(), enable: false, readOnly: true, prefix: const Padding( @@ -2068,7 +2069,7 @@ class CabBookingScreen extends StatelessWidget { .value, // backgroundColor: AppThemeData.grey50, // borderColor: AppThemeData.grey50, - hintText: "Destination Location".tr, + hintText: ConstTexts.destinationLocation.tr(), enable: false, readOnly: true, prefix: const Padding( @@ -2118,7 +2119,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Otp :".tr, + "Otp :", style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -2281,7 +2282,7 @@ class CabBookingScreen extends StatelessWidget { InkWell( onTap: () async { ShowToastDialog.showLoader( - "Please wait...".tr, + ConstTexts.pleaseWait.tr(), ); UserModel? customer = @@ -2480,7 +2481,7 @@ class CabBookingScreen extends StatelessWidget { SizedBox(width: 22), Expanded( child: Text( - controller.selectedPaymentMethod.value.tr, + controller.selectedPaymentMethod.value, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle( fontSize: 16, @@ -2492,7 +2493,7 @@ class CabBookingScreen extends StatelessWidget { ), ), Text( - "Change".tr, + ConstTexts.change.tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle( fontSize: 16, @@ -2526,7 +2527,7 @@ class CabBookingScreen extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Order Summary".tr, + ConstTexts.orderSummary.tr(), style: AppThemeData.boldTextStyle( fontSize: 14, color: @@ -2546,7 +2547,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Subtotal".tr, + ConstTexts.subtotal.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -2582,7 +2583,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Discount".tr, + ConstTexts.discount.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -2621,7 +2622,7 @@ class CabBookingScreen extends StatelessWidget { Expanded( child: Text( '${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})' - .tr, + , textAlign: TextAlign.start, style: AppThemeData.mediumTextStyle( fontSize: 14, @@ -2646,7 +2647,7 @@ class CabBookingScreen extends StatelessWidget { .toString(), taxModel: taxModel, ).toString(), - ).tr, + ), textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle( fontSize: 16, @@ -2672,7 +2673,7 @@ class CabBookingScreen extends StatelessWidget { MainAxisAlignment.spaceBetween, children: [ Text( - "Order Total".tr, + ConstTexts.orderTotal.tr(), style: AppThemeData.mediumTextStyle( fontSize: 16, color: @@ -2713,13 +2714,13 @@ class CabBookingScreen extends StatelessWidget { children: [ RoundedButtonFill( borderRadius: 10.r, - title: "SOS".tr, + title: "SOS", color: Colors.red.withValues(alpha: 0.50), textColor: AppThemeData.grey50, isCenter: true, icon: const Icon(Icons.call, color: Colors.white), onPress: () async { - ShowToastDialog.showLoader("Please wait...".tr); + ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr()); LocationData location = await controller.currentLocation.value @@ -2740,8 +2741,8 @@ class CabBookingScreen extends StatelessWidget { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - "Your SOS request has been submitted to admin" - .tr, + ConstTexts.yourSosRequest.tr() + ), backgroundColor: Colors.green, duration: Duration(seconds: 3), @@ -2753,8 +2754,7 @@ class CabBookingScreen extends StatelessWidget { ScaffoldMessenger.of(context).showSnackBar( SnackBar( content: Text( - "Your SOS request is already submitted" - .tr, + ConstTexts.yourSosrequestAlreadySubmitted.tr() ), backgroundColor: Colors.red, duration: Duration(seconds: 3), @@ -2777,7 +2777,7 @@ class CabBookingScreen extends StatelessWidget { controller.currentOrder.value.paymentStatus == false) { return RoundedButtonFill( borderRadius: 10.r, - title: "Pay Now".tr, + title: ConstTexts.payNow.tr(), onPress: () async { if (controller.selectedPaymentMethod.value == PaymentGateway.stripe.name) { @@ -2822,7 +2822,7 @@ class CabBookingScreen extends StatelessWidget { Constant.userModel!.walletAmount! < controller.totalAmount.value) { ShowToastDialog.showToast( - "You do not have sufficient wallet balance".tr, + ConstTexts.youDoNothaveSufficientwalletBalance.tr() ); } else { controller.completeOrder(); @@ -2858,8 +2858,8 @@ class CabBookingScreen extends StatelessWidget { if (value == null) { Get.back(); ShowToastDialog.showToast( - "Something went wrong, please contact admin." - .tr, + + ConstTexts.somethingWentWrong.tr() ); } else { CreateRazorPayOrderModel result = value; @@ -2873,7 +2873,7 @@ class CabBookingScreen extends StatelessWidget { }); } else { ShowToastDialog.showToast( - "Please select payment method".tr, + ConstTexts.plsSelectPaymentMethod.tr(), ); } }, @@ -3007,7 +3007,7 @@ class CabBookingScreen extends StatelessWidget { : Expanded( child: Text( value.name == "cod" - ? "Наличными" + ? ConstTexts.cash.tr() : value.name.capitalizeString(), textAlign: TextAlign.start, style: AppThemeData.semiBoldTextStyle( diff --git a/pubspec.yaml b/pubspec.yaml index 6d943bf..16a2b21 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: customer description: "A new Flutter project." -version: 1.0.0+2 +version: 1.0.0+3 environment: sdk: ^3.7.2