BASE: Implement Localization In Intercity Home Screen.

This commit is contained in:
2025-12-03 17:30:54 +05:00
parent 452722faaa
commit f2a7679d4b
3 changed files with 66 additions and 62 deletions

View File

@@ -94,5 +94,9 @@
"typeComment": "Type comment....",
"title": "Title",
"typeDescription": "Type Description...",
"save": "Save"
"save": "Save",
"popularDestinations": "Popular Destinations",
"selectPaymentMethod": "Select Payment Method",
"prefferedPayment": "Preferred Payment",
"otherPaymentOptions": "Other Payment Options"
}

View File

@@ -94,10 +94,10 @@ class ConstTexts {
static String title = "title";
static String typeDescription = "typeDescription";
static String save = "save";
static String everyRideVerified = "everyRideVerified";
static String allDriversIDCheck = "allDriversIDCheck";
static String intercity = "intercity";
static String aroundTheCity = "aroundTheCity";
static String popularDestinations = "popularDestinations";
static String selectPaymentMethod = "selectPaymentMethod";
static String prefferedPayment = "prefferedPayment";
static String otherPaymentOptions = "otherPaymentOptions";
static String rideDetails = "rideDetails";
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
static String somethingWentWrong = "somethingWentWrong";

View File

@@ -1,6 +1,5 @@
import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:customer/constant/const_texts.dart';
import 'package:customer/controllers/Intercity_home_controller.dart';
import 'package:customer/models/coupon_model.dart';
import 'package:customer/models/tax_model.dart';
@@ -14,6 +13,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';
@@ -174,7 +174,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.sourceTextEditController.value.text = address.toString();
controller.setDepartureMarker(lat, lng);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast(ConstTexts.serviceIsUnavailable.tr());
}
}
} else {
@@ -186,7 +186,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.sourceTextEditController.value.text = Utils.formatAddress(selectedLocation: selectedLocationModel);
controller.setDepartureMarker(selectedLocationModel.latLng!.latitude, selectedLocationModel.latLng!.longitude);
} else {
ShowToastDialog.showToast("Service is unavailable at the selected address.".tr);
ShowToastDialog.showToast(ConstTexts.serviceIsUnavailable.tr());
}
}
});
@@ -194,7 +194,7 @@ class IntercityHomeScreen extends StatelessWidget {
},
child: TextFieldWidget(
controller: controller.sourceTextEditController.value,
hintText: "Pickup Location".tr,
hintText: ConstTexts.pickUpLocation.tr(),
enable: false,
prefix: Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Image.asset("assets/icons/pickup.png", height: 22, width: 22)),
),
@@ -229,7 +229,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller: controller.destinationTextEditController.value,
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText: "Destination Location".tr,
hintText: ConstTexts.destinationLocation.tr(),
enable: false,
prefix: const Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.radio_button_checked, color: Colors.red)),
),
@@ -257,7 +257,7 @@ class IntercityHomeScreen extends StatelessWidget {
],
),
SizedBox(height: 15),
Align(alignment: Alignment.centerLeft, child: Text("Popular Destinations".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: AppThemeData.grey900))),
Align(alignment: Alignment.centerLeft, child: Text(ConstTexts.popularDestinations.tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: AppThemeData.grey900))),
SizedBox(
height: 120,
child: Padding(
@@ -322,12 +322,12 @@ class IntercityHomeScreen extends StatelessWidget {
SizedBox(height: 10),
RoundedButtonFill(
borderRadius: 10.r,
title: "Continue".tr,
title: ConstTexts.continueT.tr(),
onPress: () {
if (controller.sourceTextEditController.value.text.isEmpty) {
ShowToastDialog.showToast("Please select source location".tr);
ShowToastDialog.showToast(ConstTexts.plsSelectSourceLocation.tr());
} else if (controller.destinationTextEditController.value.text.isEmpty) {
ShowToastDialog.showToast("Please select destination location".tr);
ShowToastDialog.showToast(ConstTexts.plsSelectDestinationLocations.tr());
} else {
controller.bottomSheetType.value = "vehicleSelection";
}
@@ -364,7 +364,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(
"Select Your Vehicle Type".tr,
ConstTexts.selectVehicleType.tr(),
style: AppThemeData.boldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
textAlign: TextAlign.start,
),
@@ -473,7 +473,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.calculateTotalAmount();
controller.bottomSheetType.value = "payment";
} else {
ShowToastDialog.showToast("Please select a vehicle type first.".tr);
ShowToastDialog.showToast(ConstTexts.plsSelectVehicleTypeFirst.tr());
}
},
color: AppThemeData.primary300,
@@ -506,7 +506,7 @@ class IntercityHomeScreen extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Select Payment Method".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.selectPaymentMethod.tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
GestureDetector(
onTap: () {
Get.back();
@@ -521,7 +521,7 @@ class IntercityHomeScreen extends StatelessWidget {
padding: EdgeInsets.zero,
controller: scrollController,
children: [
Text("Preferred Payment".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text(ConstTexts.prefferedPayment.tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 10),
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
Container(
@@ -552,7 +552,7 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
const SizedBox(height: 10),
Text(
"Other Payment Options".tr,
ConstTexts.otherPaymentOptions.tr(),
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
),
@@ -598,18 +598,18 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: "Continue".tr,
title: ConstTexts.continueT.tr(),
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast("Please select a payment method".tr);
ShowToastDialog.showToast(ConstTexts.plsSelectPaymentMethod.tr());
return;
}
if (controller.selectedPaymentMethod.value == "wallet") {
num walletAmount = controller.userModel.value.walletAmount ?? 0;
if (walletAmount <= 0) {
ShowToastDialog.showToast("Insufficient wallet balance. Please select another payment method.".tr);
ShowToastDialog.showToast(ConstTexts.insufficientWallet.tr());
return;
}
}
@@ -703,7 +703,7 @@ class IntercityHomeScreen extends StatelessWidget {
},
child: TextFieldWidget(
controller: controller.sourceTextEditController.value,
hintText: "Pickup Location".tr,
hintText: ConstTexts.pickUpLocation.tr(),
enable: false,
prefix: const Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.stop_circle_outlined, color: Colors.green)),
),
@@ -738,7 +738,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller: controller.destinationTextEditController.value,
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText: "Destination Location".tr,
hintText: ConstTexts.destinationLocation.tr(),
enable: false,
prefix: const Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.radio_button_checked, color: Colors.red)),
),
@@ -769,7 +769,7 @@ class IntercityHomeScreen extends StatelessWidget {
Row(
children: [
Expanded(child: Text("Promo code".tr, style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
Expanded(child: Text(ConstTexts.promoCode.tr(), style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))),
InkWell(
onTap: () {
Get.to(CabCouponCodeScreen())!.then((value) {
@@ -779,13 +779,13 @@ class IntercityHomeScreen extends StatelessWidget {
controller.selectedCouponModel.value = value;
controller.calculateTotalAmount();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast(ConstTexts.thisOfferNotEligible.tr());
}
}
});
},
child: Text(
"View All".tr,
ConstTexts.viewAll.tr(),
style: AppThemeData.boldTextStyle(decoration: TextDecoration.underline, fontSize: 14, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
),
),
@@ -815,7 +815,7 @@ class IntercityHomeScreen extends StatelessWidget {
style: AppThemeData.semiBoldTextStyle(color: AppThemeData.parcelService500, fontSize: 16),
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Write coupon Code'.tr,
hintText: ConstTexts.writeCoupon.tr(),
contentPadding: EdgeInsets.only(bottom: 10),
hintStyle: AppThemeData.semiBoldTextStyle(color: AppThemeData.parcelService500, fontSize: 16),
),
@@ -824,7 +824,7 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: "Redeem now".tr,
title: ConstTexts.redeemNow.tr(),
width: 27.w,
fontSizes: 14,
@@ -842,13 +842,13 @@ class IntercityHomeScreen extends StatelessWidget {
controller.calculateTotalAmount();
controller.update();
} else {
ShowToastDialog.showToast("This offer not eligible for this booking".tr);
ShowToastDialog.showToast(ConstTexts.thisOfferNotEligible.tr());
}
} else {
ShowToastDialog.showToast("This coupon code has been expired".tr);
ShowToastDialog.showToast(ConstTexts.couponExpired.tr());
}
} else {
ShowToastDialog.showToast("Invalid coupon code".tr);
ShowToastDialog.showToast(ConstTexts.invalidCouponCode.tr());
}
},
color: AppThemeData.parcelService300,
@@ -872,7 +872,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text(ConstTexts.orderSummary.tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 8),
Padding(
@@ -880,7 +880,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Subtotal".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.subtotal.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
Constant.amountShow(amount: controller.subTotal.value.toString()),
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -896,7 +896,7 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
Row(
children: [
Text("Discount".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.discount.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
SizedBox(width: 5),
Text(
controller.selectedCouponModel.value.id == null ? "" : "(${controller.selectedCouponModel.value.code})",
@@ -923,7 +923,7 @@ class IntercityHomeScreen 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(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -931,7 +931,7 @@ class IntercityHomeScreen extends StatelessWidget {
Text(
Constant.amountShow(
amount: Constant.calculateTax(amount: (controller.subTotal.value - controller.discount.value).toString(), taxModel: taxModel).toString(),
).tr,
),
textAlign: TextAlign.start,
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -947,7 +947,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Order Total".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.orderTotal.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
Constant.amountShow(amount: controller.totalAmount.value.toString()),
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -995,7 +995,7 @@ class IntercityHomeScreen extends StatelessWidget {
: cardDecorationScreen(controller, PaymentGateway.razorpay, isDark, "assets/images/razorpay.png"),
SizedBox(width: 22),
Text(
controller.selectedPaymentMethod.value.tr,
controller.selectedPaymentMethod.value,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -1007,7 +1007,7 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: "Confirm Booking".tr,
title: ConstTexts.confirmBooking.tr(),
onPress: () async {
controller.placeOrder();
},
@@ -1042,11 +1042,11 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(10), color: AppThemeData.grey400), height: 4, width: 33),
SizedBox(height: 30),
Text("Waiting for driver....".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Text(ConstTexts.waitingForDriver.tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: AppThemeData.grey900)),
Image.asset('assets/loader.gif', width: 250),
RoundedButtonFill(
borderRadius: 10.r,
title: "Cancel Ride".tr,
title: ConstTexts.cancelRide.tr(),
onPress: () async {
try {
// 1. Update current order status
@@ -1081,12 +1081,12 @@ class IntercityHomeScreen extends StatelessWidget {
}
// 5. Optional feedback
ShowToastDialog.showToast("Ride cancelled successfully".tr);
ShowToastDialog.showToast(ConstTexts.riderCancelledSucces.tr());
Get.back();
CabDashboardController cabDashboardController = Get.put(CabDashboardController());
cabDashboardController.selectedIndex.value = 0;
} catch (e) {
ShowToastDialog.showToast("Failed to cancel ride".tr);
ShowToastDialog.showToast(ConstTexts.failedToCancel.tr());
}
},
color: AppThemeData.danger300,
@@ -1157,7 +1157,7 @@ class IntercityHomeScreen extends StatelessWidget {
},
child: TextFieldWidget(
controller: controller.sourceTextEditController.value,
hintText: "Pickup Location".tr,
hintText: ConstTexts.pickUpLocation.tr(),
enable: false,
readOnly: true,
prefix: const Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.stop_circle_outlined, color: Colors.green)),
@@ -1193,7 +1193,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller: controller.destinationTextEditController.value,
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText: "Destination Location".tr,
hintText: ConstTexts.destinationLocation.tr(),
enable: false,
readOnly: true,
prefix: const Padding(padding: EdgeInsets.only(left: 10, right: 10), child: Icon(Icons.radio_button_checked, color: Colors.red)),
@@ -1277,7 +1277,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Order Summary".tr, style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
Text(ConstTexts.orderSummary.tr(), style: AppThemeData.boldTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
const SizedBox(height: 8),
Padding(
@@ -1285,7 +1285,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Subtotal".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.subtotal.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
Constant.amountShow(amount: controller.subTotal.value.toString()),
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -1299,7 +1299,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Discount".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.discount.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(Constant.amountShow(amount: controller.discount.value.toString()), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.danger300)),
],
),
@@ -1319,7 +1319,7 @@ class IntercityHomeScreen 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(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -1327,7 +1327,7 @@ class IntercityHomeScreen extends StatelessWidget {
Text(
Constant.amountShow(
amount: Constant.calculateTax(amount: (controller.subTotal.value - controller.discount.value).toString(), taxModel: taxModel).toString(),
).tr,
),
textAlign: TextAlign.start,
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -1343,7 +1343,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Order Total".tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(ConstTexts.orderTotal.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
Text(
Constant.amountShow(amount: controller.totalAmount.value.toString()),
style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
@@ -1393,7 +1393,7 @@ class IntercityHomeScreen extends StatelessWidget {
: cardDecorationScreen(controller, PaymentGateway.razorpay, isDark, "assets/images/razorpay.png"),
SizedBox(width: 22),
Text(
controller.selectedPaymentMethod.value.tr,
controller.selectedPaymentMethod.value,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
),
@@ -1408,13 +1408,13 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
RoundedButtonFill(
borderRadius: 10.r,
title: "SOS".tr,
color: Colors.red.withOpacity(0.50),
title: "SOS",
color: Colors.red.withValues(alpha: 0.50),
textColor: AppThemeData.grey50,
isCenter: true,
icon: Icon(Icons.call, color: Colors.white),
onPress: () async {
ShowToastDialog.showLoader("Please wait...".tr);
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr());
LocationData location = await controller.currentLocation.value.getLocation();
@@ -1426,7 +1426,7 @@ class IntercityHomeScreen extends StatelessWidget {
SnackBar(
content: Builder(
builder: (context) {
return Text("Your SOS request has been submitted to admin".tr);
return Text(ConstTexts.yourSosRequest.tr());
},
),
backgroundColor: Colors.green,
@@ -1440,7 +1440,7 @@ class IntercityHomeScreen extends StatelessWidget {
SnackBar(
content: Builder(
builder: (context) {
return Text("Your SOS request is already submitted".tr);
return Text(ConstTexts.yourSosrequestAlreadySubmitted.tr());
},
),
backgroundColor: Colors.red,
@@ -1465,7 +1465,7 @@ class IntercityHomeScreen extends StatelessWidget {
if (controller.currentOrder.value.status == Constant.orderInTransit && 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) {
controller.stripeMakePayment(amount: controller.totalAmount.value.toString());
@@ -1493,14 +1493,14 @@ class IntercityHomeScreen extends StatelessWidget {
RazorPayController().createOrderRazorPay(amount: double.parse(controller.totalAmount.value.toString()), razorpayModel: controller.razorPayModel.value).then((value) {
if (value == null) {
Get.back();
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
ShowToastDialog.showToast(ConstTexts.somethingWentWrong.tr());
} else {
CreateRazorPayOrderModel result = value;
controller.openCheckout(amount: controller.totalAmount.value.toString(), orderId: result.id);
}
});
} else {
ShowToastDialog.showToast("Please select payment method".tr);
ShowToastDialog.showToast(ConstTexts.plsSelectPaymentMethod.tr());
}
},
color: AppThemeData.primary300,