BASE: Implement Localization In Cab Booking Screen.
This commit is contained in:
@@ -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";
|
||||
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user