BASE: Switch From EasyLocalization To GetX Localization.

This commit is contained in:
2025-12-04 16:56:39 +05:00
parent 157545f1c0
commit bf1d07a048
218 changed files with 2535 additions and 2313 deletions

View File

@@ -14,12 +14,12 @@ 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';
import 'package:geocoding/geocoding.dart' as get_cord_address;
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter_map/flutter_map.dart' as flutterMap;
import 'package:latlong2/latlong.dart' as latlong;
@@ -280,7 +280,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.setDepartureMarker(lat, lng);
} else {
ShowToastDialog.showToast(
ConstTexts.serviceIsUnavailable.tr(),
ConstTexts.serviceIsUnavailable.tr,
);
}
}
@@ -313,7 +313,7 @@ class IntercityHomeScreen extends StatelessWidget {
);
} else {
ShowToastDialog.showToast(
ConstTexts.serviceIsUnavailable.tr(),
ConstTexts.serviceIsUnavailable.tr,
);
}
}
@@ -323,7 +323,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: TextFieldWidget(
controller:
controller.sourceTextEditController.value,
hintText: ConstTexts.pickUpLocation.tr(),
hintText: ConstTexts.pickUpLocation.tr,
enable: false,
prefix: Padding(
padding: EdgeInsets.only(left: 10, right: 10),
@@ -387,7 +387,7 @@ class IntercityHomeScreen extends StatelessWidget {
.value,
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText: ConstTexts.destinationLocation.tr(),
hintText: ConstTexts.destinationLocation.tr,
enable: false,
prefix: const Padding(
padding: EdgeInsets.only(left: 10, right: 10),
@@ -424,7 +424,7 @@ class IntercityHomeScreen extends StatelessWidget {
Align(
alignment: Alignment.centerLeft,
child: Text(
ConstTexts.popularDestinations.tr(),
ConstTexts.popularDestinations.tr,
style: AppThemeData.boldTextStyle(
fontSize: 16,
color: AppThemeData.grey900,
@@ -576,7 +576,7 @@ class IntercityHomeScreen extends StatelessWidget {
SizedBox(height: 10),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.continueT.tr(),
title: ConstTexts.continueT.tr,
onPress: () {
if (controller
.sourceTextEditController
@@ -584,7 +584,7 @@ class IntercityHomeScreen extends StatelessWidget {
.text
.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectSourceLocation.tr(),
ConstTexts.plsSelectSourceLocation.tr,
);
} else if (controller
.destinationTextEditController
@@ -592,7 +592,7 @@ class IntercityHomeScreen extends StatelessWidget {
.text
.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectDestinationLocations.tr(),
ConstTexts.plsSelectDestinationLocations.tr,
);
} else {
controller.bottomSheetType.value = "vehicleSelection";
@@ -650,7 +650,7 @@ class IntercityHomeScreen extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(
ConstTexts.selectVehicleType.tr(),
ConstTexts.selectVehicleType.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color:
@@ -824,7 +824,7 @@ class IntercityHomeScreen extends StatelessWidget {
Obx(
() => RoundedButtonFill(
borderRadius: 10.r,
title: 'pay_amount'.tr(namedArgs: {
title: 'pay_amount'.trParams({
'amount': controller.selectedVehicleType.value.id == null
? Constant.amountShow(amount: "0.0")
: Constant.amountShow(
@@ -842,7 +842,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.bottomSheetType.value = "payment";
} else {
ShowToastDialog.showToast(
ConstTexts.plsSelectVehicleTypeFirst.tr(),
ConstTexts.plsSelectVehicleTypeFirst.tr,
);
}
},
@@ -884,7 +884,7 @@ class IntercityHomeScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.selectPaymentMethod.tr(),
ConstTexts.selectPaymentMethod.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 18,
color:
@@ -914,7 +914,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller: scrollController,
children: [
Text(
ConstTexts.prefferedPayment.tr(),
ConstTexts.prefferedPayment.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -994,7 +994,7 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
const SizedBox(height: 10),
Text(
ConstTexts.otherPaymentOptions.tr(),
ConstTexts.otherPaymentOptions.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -1150,13 +1150,13 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.continueT.tr(),
title: ConstTexts.continueT.tr,
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
return;
}
@@ -1165,7 +1165,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.userModel.value.walletAmount ?? 0;
if (walletAmount <= 0) {
ShowToastDialog.showToast(
ConstTexts.insufficientWallet.tr(),
ConstTexts.insufficientWallet.tr,
);
return;
}
@@ -1321,7 +1321,7 @@ class IntercityHomeScreen extends StatelessWidget {
.sourceTextEditController
.value,
hintText:
ConstTexts.pickUpLocation.tr(),
ConstTexts.pickUpLocation.tr,
enable: false,
prefix: const Padding(
padding: EdgeInsets.only(
@@ -1404,8 +1404,7 @@ class IntercityHomeScreen extends StatelessWidget {
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText:
ConstTexts.destinationLocation
.tr(),
ConstTexts.destinationLocation.tr,
enable: false,
prefix: const Padding(
padding: EdgeInsets.only(
@@ -1453,7 +1452,7 @@ class IntercityHomeScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
ConstTexts.promoCode.tr(),
ConstTexts.promoCode.tr,
style: AppThemeData.boldTextStyle(
fontSize: 16,
color:
@@ -1483,15 +1482,14 @@ class IntercityHomeScreen extends StatelessWidget {
controller.calculateTotalAmount();
} else {
ShowToastDialog.showToast(
ConstTexts.thisOfferNotEligible
.tr(),
ConstTexts.thisOfferNotEligible.tr,
);
}
}
});
},
child: Text(
ConstTexts.viewAll.tr(),
ConstTexts.viewAll.tr,
style: AppThemeData.boldTextStyle(
decoration: TextDecoration.underline,
fontSize: 14,
@@ -1552,7 +1550,7 @@ class IntercityHomeScreen extends StatelessWidget {
decoration: InputDecoration(
border: InputBorder.none,
hintText:
ConstTexts.writeCoupon.tr(),
ConstTexts.writeCoupon.tr,
contentPadding: EdgeInsets.only(
bottom: 10,
),
@@ -1569,7 +1567,7 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.redeemNow.tr(),
title: ConstTexts.redeemNow.tr,
width: 27.w,
fontSizes: 14,
@@ -1623,18 +1621,17 @@ class IntercityHomeScreen extends StatelessWidget {
ShowToastDialog.showToast(
ConstTexts
.thisOfferNotEligible
.tr(),
.tr,
);
}
} else {
ShowToastDialog.showToast(
ConstTexts.couponExpired.tr(),
ConstTexts.couponExpired.tr,
);
}
} else {
ShowToastDialog.showToast(
ConstTexts.invalidCouponCode
.tr(),
ConstTexts.invalidCouponCode.tr,
);
}
},
@@ -1668,7 +1665,7 @@ class IntercityHomeScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
ConstTexts.orderSummary.tr(),
ConstTexts.orderSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -1688,7 +1685,7 @@ class IntercityHomeScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.subtotal.tr(),
ConstTexts.subtotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -1726,7 +1723,7 @@ class IntercityHomeScreen extends StatelessWidget {
Row(
children: [
Text(
ConstTexts.discount.tr(),
ConstTexts.discount.tr,
style:
AppThemeData.mediumTextStyle(
fontSize: 16,
@@ -1845,7 +1842,7 @@ class IntercityHomeScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.orderTotal.tr(),
ConstTexts.orderTotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2035,7 +2032,7 @@ class IntercityHomeScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.confirmBooking.tr(),
title: ConstTexts.confirmBooking.tr,
onPress: () async {
controller.placeOrder();
},
@@ -2091,7 +2088,7 @@ class IntercityHomeScreen extends StatelessWidget {
),
SizedBox(height: 30),
Text(
ConstTexts.waitingForDriver.tr(),
ConstTexts.waitingForDriver.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -2100,7 +2097,7 @@ class IntercityHomeScreen extends StatelessWidget {
Image.asset('assets/loader.gif', width: 250),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.cancelRide.tr(),
title: ConstTexts.cancelRide.tr,
onPress: () async {
try {
// 1. Update current order status
@@ -2150,7 +2147,7 @@ class IntercityHomeScreen extends StatelessWidget {
// 5. Optional feedback
ShowToastDialog.showToast(
ConstTexts.riderCancelledSucces.tr(),
ConstTexts.riderCancelledSucces.tr,
);
Get.back();
CabDashboardController cabDashboardController = Get.put(
@@ -2158,9 +2155,7 @@ class IntercityHomeScreen extends StatelessWidget {
);
cabDashboardController.selectedIndex.value = 0;
} catch (e) {
ShowToastDialog.showToast(
ConstTexts.failedToCancel.tr(),
);
ShowToastDialog.showToast(ConstTexts.failedToCancel.tr);
}
},
color: AppThemeData.danger300,
@@ -2258,7 +2253,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller
.sourceTextEditController
.value,
hintText: ConstTexts.pickUpLocation.tr(),
hintText: ConstTexts.pickUpLocation.tr,
enable: false,
readOnly: true,
prefix: const Padding(
@@ -2307,7 +2302,7 @@ class IntercityHomeScreen extends StatelessWidget {
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText:
ConstTexts.destinationLocation.tr(),
ConstTexts.destinationLocation.tr,
enable: false,
readOnly: true,
prefix: const Padding(
@@ -2454,7 +2449,7 @@ class IntercityHomeScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
ConstTexts.orderSummary.tr(),
ConstTexts.orderSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -2474,7 +2469,7 @@ class IntercityHomeScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.subtotal.tr(),
ConstTexts.subtotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2510,7 +2505,7 @@ class IntercityHomeScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.discount.tr(),
ConstTexts.discount.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2599,7 +2594,7 @@ class IntercityHomeScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.orderTotal.tr(),
ConstTexts.orderTotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2775,7 +2770,7 @@ class IntercityHomeScreen extends StatelessWidget {
icon: Icon(Icons.call, color: Colors.white),
onPress: () async {
ShowToastDialog.showLoader(
ConstTexts.pleaseWait.tr(),
ConstTexts.pleaseWait.tr,
);
LocationData location =
@@ -2802,8 +2797,9 @@ class IntercityHomeScreen extends StatelessWidget {
content: Builder(
builder: (context) {
return Text(
ConstTexts.yourSosRequest
.tr(),
ConstTexts
.yourSosRequest
.tr,
);
},
),
@@ -2825,7 +2821,7 @@ class IntercityHomeScreen extends StatelessWidget {
return Text(
ConstTexts
.yourSosrequestAlreadySubmitted
.tr(),
.tr,
);
},
),
@@ -2855,7 +2851,7 @@ class IntercityHomeScreen extends StatelessWidget {
controller.currentOrder.value.paymentStatus == false) {
return RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.payNow.tr(),
title: ConstTexts.payNow.tr,
onPress: () async {
if (controller.selectedPaymentMethod.value ==
PaymentGateway.stripe.name) {
@@ -2928,7 +2924,7 @@ class IntercityHomeScreen extends StatelessWidget {
if (value == null) {
Get.back();
ShowToastDialog.showToast(
ConstTexts.somethingWentWrong.tr(),
ConstTexts.somethingWentWrong.tr,
);
} else {
CreateRazorPayOrderModel result = value;
@@ -2942,7 +2938,7 @@ class IntercityHomeScreen extends StatelessWidget {
});
} else {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
}
},

View File

@@ -14,11 +14,10 @@ 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';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter_map/flutter_map.dart' as flutterMap;
import 'package:latlong2/latlong.dart' as latlong;
@@ -286,7 +285,7 @@ class CabBookingScreen extends StatelessWidget {
controller.setDepartureMarker(lat, lng);
} else {
ShowToastDialog.showToast(
ConstTexts.serviceIsUnavailable.tr(),
ConstTexts.serviceIsUnavailable.tr,
);
}
}
@@ -319,7 +318,7 @@ class CabBookingScreen extends StatelessWidget {
);
} else {
ShowToastDialog.showToast(
ConstTexts.serviceIsUnavailable.tr(),
ConstTexts.serviceIsUnavailable.tr,
);
}
}
@@ -330,7 +329,7 @@ class CabBookingScreen extends StatelessWidget {
controller:
controller.sourceTextEditController.value,
// backgroundColor: AppThemeData.cardColor,
hintText: ConstTexts.pickUpLocation.tr(),
hintText: ConstTexts.pickUpLocation.tr,
enable: false,
prefix: Padding(
padding: EdgeInsets.only(left: 10, right: 10),
@@ -394,7 +393,7 @@ class CabBookingScreen extends StatelessWidget {
.value,
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText: ConstTexts.destinationLocation.tr(),
hintText: ConstTexts.destinationLocation.tr,
// backgroundColor: AppThemeData.cardColor,
enable: false,
prefix: const Padding(
@@ -431,7 +430,7 @@ class CabBookingScreen extends StatelessWidget {
SizedBox(height: 15),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.continueT.tr(),
title: ConstTexts.continueT.tr,
onPress: () {
if (controller
.sourceTextEditController
@@ -439,7 +438,7 @@ class CabBookingScreen extends StatelessWidget {
.text
.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectSourceLocation.tr(),
ConstTexts.plsSelectSourceLocation.tr,
);
} else if (controller
.destinationTextEditController
@@ -447,7 +446,7 @@ class CabBookingScreen extends StatelessWidget {
.text
.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectDestinationLocations.tr(),
ConstTexts.plsSelectDestinationLocations.tr,
);
} else {
controller.bottomSheetType.value = "vehicleSelection";
@@ -506,7 +505,7 @@ class CabBookingScreen extends StatelessWidget {
Padding(
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
child: Text(
ConstTexts.selectVehicleType.tr(),
ConstTexts.selectVehicleType.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18.sp,
color:
@@ -668,15 +667,21 @@ class CabBookingScreen extends StatelessWidget {
child: Obx(
() => RoundedButtonFill(
borderRadius: 10.r,
title: 'pay_amount'.tr(namedArgs: {
'amount': controller.selectedVehicleType.value.id == null
? Constant.amountShow(amount: "0.0")
: Constant.amountShow(
amount: controller
.getAmount(controller.selectedVehicleType.value)
.toString(),
),
}),
title: 'pay_amount'.trParams({
'amount':
controller.selectedVehicleType.value.id == null
? Constant.amountShow(amount: "0.0")
: Constant.amountShow(
amount:
controller
.getAmount(
controller
.selectedVehicleType
.value,
)
.toString(),
),
}),
onPress: () async {
if (controller.selectedVehicleType.value.id != null) {
@@ -684,7 +689,7 @@ class CabBookingScreen extends StatelessWidget {
controller.bottomSheetType.value = "payment";
} else {
ShowToastDialog.showToast(
ConstTexts.plsSelectVehicleTypeFirst.tr(),
ConstTexts.plsSelectVehicleTypeFirst.tr,
);
}
},
@@ -904,13 +909,13 @@ class CabBookingScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.continueT.tr(),
title: ConstTexts.continueT.tr,
color: AppThemeData.mainColor,
textColor: AppThemeData.grey50,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
return;
}
@@ -919,7 +924,7 @@ class CabBookingScreen extends StatelessWidget {
controller.userModel.value.walletAmount ?? 0;
if (walletAmount <= 0) {
ShowToastDialog.showToast(
ConstTexts.insufficientWallet.tr(),
ConstTexts.insufficientWallet.tr,
);
return;
}
@@ -1059,7 +1064,7 @@ class CabBookingScreen extends StatelessWidget {
.sourceTextEditController
.value,
hintText:
ConstTexts.pickUpLocation.tr(),
ConstTexts.pickUpLocation.tr,
enable: false,
prefix: const Padding(
padding: EdgeInsets.only(
@@ -1142,8 +1147,7 @@ class CabBookingScreen extends StatelessWidget {
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText:
ConstTexts.destinationLocation
.tr(),
ConstTexts.destinationLocation.tr,
enable: false,
prefix: const Padding(
padding: EdgeInsets.only(
@@ -1190,7 +1194,7 @@ class CabBookingScreen extends StatelessWidget {
children: [
Expanded(
child: Text(
ConstTexts.promoCode.tr(),
ConstTexts.promoCode.tr,
style: AppThemeData.boldTextStyle(
fontSize: 16,
color:
@@ -1224,15 +1228,14 @@ class CabBookingScreen extends StatelessWidget {
controller.calculateTotalAmount();
} else {
ShowToastDialog.showToast(
ConstTexts.thisOfferNotEligible
.tr(),
ConstTexts.thisOfferNotEligible.tr,
);
}
}
});
},
child: Text(
ConstTexts.viewAll.tr(),
ConstTexts.viewAll.tr,
style: AppThemeData.boldTextStyle(
decoration: TextDecoration.underline,
fontSize: 14,
@@ -1293,7 +1296,7 @@ class CabBookingScreen extends StatelessWidget {
decoration: InputDecoration(
border: InputBorder.none,
hintText:
ConstTexts.writeCoupon.tr(),
ConstTexts.writeCoupon.tr,
contentPadding: EdgeInsets.only(
bottom: 10,
),
@@ -1310,7 +1313,7 @@ class CabBookingScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.redeemNow.tr(),
title: ConstTexts.redeemNow.tr,
width: 27.w,
fontSizes: 14,
onPress: () async {
@@ -1321,8 +1324,9 @@ class CabBookingScreen extends StatelessWidget {
.trim()
.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsEnterCouponCode
.tr(),
ConstTexts
.plsEnterCouponCode
.tr,
);
return;
}
@@ -1374,26 +1378,24 @@ class CabBookingScreen extends StatelessWidget {
controller
.calculateTotalAmount();
ShowToastDialog.showToast(
ConstTexts.couponApplied
.tr(),
ConstTexts.couponApplied.tr,
);
controller.update();
} else {
ShowToastDialog.showToast(
ConstTexts
.thisOfferNotEligible
.tr(),
.tr,
);
}
} else {
ShowToastDialog.showToast(
ConstTexts.couponExpired.tr(),
ConstTexts.couponExpired.tr,
);
}
} else {
ShowToastDialog.showToast(
ConstTexts.invalidCouponCode
.tr(),
ConstTexts.invalidCouponCode.tr,
);
}
},
@@ -1426,7 +1428,7 @@ class CabBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
ConstTexts.orderSummary.tr(),
ConstTexts.orderSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -1446,7 +1448,7 @@ class CabBookingScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.subtotal.tr(),
ConstTexts.subtotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -1484,7 +1486,7 @@ class CabBookingScreen extends StatelessWidget {
Row(
children: [
Text(
ConstTexts.discount.tr(),
ConstTexts.discount.tr,
style:
AppThemeData.mediumTextStyle(
fontSize: 16,
@@ -1603,7 +1605,7 @@ class CabBookingScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.orderTotal.tr(),
ConstTexts.orderTotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -1779,8 +1781,10 @@ class CabBookingScreen extends StatelessWidget {
controller.selectedPaymentMethod.value ==
"cod"
? "Наличными"
: controller.selectedPaymentMethod.value
.tr(),
: controller
.selectedPaymentMethod
.value
.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 16,
@@ -1798,7 +1802,7 @@ class CabBookingScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.confirmBooking.tr(),
title: ConstTexts.confirmBooking.tr,
onPress: () async {
controller.placeOrder();
},
@@ -1854,7 +1858,7 @@ class CabBookingScreen extends StatelessWidget {
),
SizedBox(height: 30),
Text(
ConstTexts.waitingForDriver.tr(),
ConstTexts.waitingForDriver.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18.sp,
color:
@@ -1866,7 +1870,7 @@ class CabBookingScreen extends StatelessWidget {
Image.asset('assets/loader.gif', width: 250),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.cancelRide.tr(),
title: ConstTexts.cancelRide.tr,
color: AppThemeData.mainColor,
textColor: AppThemeData.surface,
onPress: () async {
@@ -1913,7 +1917,7 @@ class CabBookingScreen extends StatelessWidget {
await FireStoreUtils.updateUser(Constant.userModel!);
}
ShowToastDialog.showToast(
ConstTexts.riderCancelledSucces.tr(),
ConstTexts.riderCancelledSucces.tr,
);
// Get.offAll(const CabDashboardScreen());
Get.back();
@@ -1922,9 +1926,7 @@ class CabBookingScreen extends StatelessWidget {
);
cabDashboardController.selectedIndex.value = 0;
} catch (e) {
ShowToastDialog.showToast(
ConstTexts.failedToCancel.tr(),
);
ShowToastDialog.showToast(ConstTexts.failedToCancel.tr);
}
},
),
@@ -2019,7 +2021,7 @@ class CabBookingScreen extends StatelessWidget {
controller
.sourceTextEditController
.value,
hintText: ConstTexts.pickUpLocation.tr(),
hintText: ConstTexts.pickUpLocation.tr,
enable: false,
readOnly: true,
prefix: const Padding(
@@ -2067,7 +2069,7 @@ class CabBookingScreen extends StatelessWidget {
// backgroundColor: AppThemeData.grey50,
// borderColor: AppThemeData.grey50,
hintText:
ConstTexts.destinationLocation.tr(),
ConstTexts.destinationLocation.tr,
enable: false,
readOnly: true,
prefix: const Padding(
@@ -2280,7 +2282,7 @@ class CabBookingScreen extends StatelessWidget {
InkWell(
onTap: () async {
ShowToastDialog.showLoader(
ConstTexts.pleaseWait.tr(),
ConstTexts.pleaseWait.tr,
);
UserModel? customer =
@@ -2491,7 +2493,7 @@ class CabBookingScreen extends StatelessWidget {
),
),
Text(
ConstTexts.change.tr(),
ConstTexts.change.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 16,
@@ -2525,7 +2527,7 @@ class CabBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
ConstTexts.orderSummary.tr(),
ConstTexts.orderSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -2545,7 +2547,7 @@ class CabBookingScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.subtotal.tr(),
ConstTexts.subtotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2581,7 +2583,7 @@ class CabBookingScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.discount.tr(),
ConstTexts.discount.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2670,7 +2672,7 @@ class CabBookingScreen extends StatelessWidget {
MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.orderTotal.tr(),
ConstTexts.orderTotal.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 16,
color:
@@ -2718,7 +2720,7 @@ class CabBookingScreen extends StatelessWidget {
icon: const Icon(Icons.call, color: Colors.white),
onPress: () async {
ShowToastDialog.showLoader(
ConstTexts.pleaseWait.tr(),
ConstTexts.pleaseWait.tr,
);
LocationData location =
@@ -2740,7 +2742,7 @@ class CabBookingScreen extends StatelessWidget {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
ConstTexts.yourSosRequest.tr(),
ConstTexts.yourSosRequest.tr,
),
backgroundColor: Colors.green,
duration: Duration(seconds: 3),
@@ -2754,7 +2756,7 @@ class CabBookingScreen extends StatelessWidget {
content: Text(
ConstTexts
.yourSosrequestAlreadySubmitted
.tr(),
.tr,
),
backgroundColor: Colors.red,
duration: Duration(seconds: 3),
@@ -2777,7 +2779,7 @@ class CabBookingScreen extends StatelessWidget {
controller.currentOrder.value.paymentStatus == false) {
return RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.payNow.tr(),
title: ConstTexts.payNow.tr,
onPress: () async {
if (controller.selectedPaymentMethod.value ==
PaymentGateway.stripe.name) {
@@ -2822,8 +2824,9 @@ class CabBookingScreen extends StatelessWidget {
Constant.userModel!.walletAmount! <
controller.totalAmount.value) {
ShowToastDialog.showToast(
ConstTexts.youDoNothaveSufficientwalletBalance
.tr(),
ConstTexts
.youDoNothaveSufficientwalletBalance
.tr,
);
} else {
controller.completeOrder();
@@ -2859,7 +2862,7 @@ class CabBookingScreen extends StatelessWidget {
if (value == null) {
Get.back();
ShowToastDialog.showToast(
ConstTexts.somethingWentWrong.tr(),
ConstTexts.somethingWentWrong.tr,
);
} else {
CreateRazorPayOrderModel result = value;
@@ -2873,7 +2876,7 @@ class CabBookingScreen extends StatelessWidget {
});
} else {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
}
},
@@ -3007,7 +3010,7 @@ class CabBookingScreen extends StatelessWidget {
: Expanded(
child: Text(
value.name == "cod"
? ConstTexts.cash.tr()
? ConstTexts.cash.tr
: value.name.capitalizeString(),
textAlign: TextAlign.start,
style: AppThemeData.semiBoldTextStyle(

View File

@@ -7,9 +7,9 @@ import 'package:customer/themes/app_them_data.dart';
import 'package:customer/themes/responsive.dart';
import 'package:customer/widget/my_separator.dart';
import 'package:dotted_border/dotted_border.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
class CabCouponCodeScreen extends StatelessWidget {
const CabCouponCodeScreen({super.key});
@@ -52,7 +52,7 @@ class CabCouponCodeScreen extends StatelessWidget {
),
const SizedBox(width: 10),
Text(
ConstTexts.coupon.tr(),
ConstTexts.coupon.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -67,7 +67,7 @@ class CabCouponCodeScreen extends StatelessWidget {
? Constant.loader()
: controller.cabCouponList.isEmpty
? Constant.showEmptyView(
message: ConstTexts.couponNotFound.tr(),
message: ConstTexts.couponNotFound.tr,
)
: ListView.builder(
shrinkWrap: true,
@@ -182,7 +182,7 @@ class CabCouponCodeScreen extends StatelessWidget {
Get.back(result: couponModel);
},
child: Text(
ConstTexts.tapToApply.tr(),
ConstTexts.tapToApply.tr,
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.medium,

View File

@@ -3,11 +3,11 @@ import 'package:customer/constant/constant.dart';
import 'package:customer/controllers/cab_dashboard_controller.dart';
import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/themes/app_them_data.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';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
class CabDashboardScreen extends StatelessWidget {
const CabDashboardScreen({super.key});
@@ -52,21 +52,21 @@ class CabDashboardScreen extends StatelessWidget {
isDark,
index: 0,
assetIcon: "assets/icons/ic_home_cab.svg",
label: ConstTexts.home.tr(),
label: ConstTexts.home.tr,
controller: controller,
),
navigationBarItem(
isDark,
index: 1,
assetIcon: "assets/icons/ic_booking_cab.svg",
label: ConstTexts.myBookings.tr(),
label: ConstTexts.myBookings.tr,
controller: controller,
),
navigationBarItem(
isDark,
index: 2,
assetIcon: "assets/icons/ic_profile.svg",
label: ConstTexts.profile.tr(),
label: ConstTexts.profile.tr,
controller: controller,
),
]
@@ -75,28 +75,28 @@ class CabDashboardScreen extends StatelessWidget {
isDark,
index: 0,
assetIcon: "assets/icons/ic_home_cab.svg",
label: ConstTexts.home.tr(),
label: ConstTexts.home.tr,
controller: controller,
),
navigationBarItem(
isDark,
index: 1,
assetIcon: "assets/icons/ic_booking_cab.svg",
label: ConstTexts.myBookings.tr(),
label: ConstTexts.myBookings.tr,
controller: controller,
),
navigationBarItem(
isDark,
index: 2,
assetIcon: "assets/icons/ic_wallet_cab.svg",
label: ConstTexts.wallet.tr(),
label: ConstTexts.wallet.tr,
controller: controller,
),
navigationBarItem(
isDark,
index: 3,
assetIcon: "assets/icons/ic_profile.svg",
label: ConstTexts.profile.tr(),
label: ConstTexts.profile.tr,
controller: controller,
),
],

View File

@@ -5,12 +5,13 @@ import 'package:customer/controllers/theme_controller.dart';
import 'package:customer/models/banner_model.dart';
import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/themes/app_them_data.dart';
import 'package:customer/utils/app_router.dart';
import 'package:customer/utils/network_image_widget.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import 'Intercity_home_screen.dart';
import 'cab_booking_screen.dart';
@@ -52,7 +53,7 @@ class CabHomeScreen extends HookWidget {
Get.offAll(const LoginScreen());
},
child: Text(
ConstTexts.login.tr(),
ConstTexts.login.tr,
textAlign: TextAlign.center,
style: AppThemeData.boldTextStyle(
color: AppThemeData.grey900,
@@ -99,7 +100,7 @@ class CabHomeScreen extends HookWidget {
children: [
SizedBox(height: 20),
Text(
ConstTexts.cabServiceType.tr(),
ConstTexts.cabServiceType.tr,
style: AppThemeData.boldTextStyle(
color:
isDark
@@ -123,7 +124,7 @@ class CabHomeScreen extends HookWidget {
CrossAxisAlignment.start,
children: [
Text(
ConstTexts.everyRideVerified.tr(),
ConstTexts.everyRideVerified.tr,
style: AppThemeData.boldTextStyle(
color:
isDark
@@ -133,7 +134,7 @@ class CabHomeScreen extends HookWidget {
),
),
Text(
ConstTexts.allDriversIDCheck.tr(),
ConstTexts.allDriversIDCheck.tr,
style: AppThemeData.mediumTextStyle(
color:
isDark
@@ -171,7 +172,7 @@ class CabHomeScreen extends HookWidget {
Constant.sectionConstantModel!.rideType == "both" ||
Constant.sectionConstantModel!.rideType == "ride"
? _cabOptionMaker(
title: ConstTexts.aroundTheCity.tr(),
title: ConstTexts.aroundTheCity.tr,
isMain: false,
image: "assets/images/taxi_option.png",
useGradient: false,
@@ -182,7 +183,7 @@ class CabHomeScreen extends HookWidget {
)
: Expanded(child: SizedBox()),
_cabOptionMaker(
title: ConstTexts.intercity.tr(),
title: ConstTexts.intercity.tr,
isMain: false,
useGradient: false,
image: "assets/images/outer_city_taxi_option.png",

View File

@@ -1,10 +1,10 @@
import 'package:customer/constant/const_texts.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/svg.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../constant/constant.dart';
import '../../controllers/cab_order_details_controller.dart';
import '../../controllers/theme_controller.dart';
@@ -64,7 +64,7 @@ class CabOrderDetails extends StatelessWidget {
),
const SizedBox(width: 10),
Text(
ConstTexts.rideDetails.tr(),
ConstTexts.rideDetails.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -98,7 +98,7 @@ class CabOrderDetails extends StatelessWidget {
width: double.infinity,
padding: const EdgeInsets.all(16),
child: Text(
"${ConstTexts.orderId.tr()} ${Constant.orderId(orderId: controller.cabOrder.value.id.toString())}",
"${ConstTexts.orderId.tr} ${Constant.orderId(orderId: controller.cabOrder.value.id.toString())}",
textAlign: TextAlign.start,
style: TextStyle(
fontFamily: AppThemeData.semiBold,
@@ -131,7 +131,7 @@ class CabOrderDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${ConstTexts.bookingData.tr()} ${controller.formatDate(controller.cabOrder.value.scheduleDateTime!)}",
"${ConstTexts.bookingData.tr} ${controller.formatDate(controller.cabOrder.value.scheduleDateTime!)}",
textAlign: TextAlign.start,
style: TextStyle(
@@ -436,7 +436,7 @@ class CabOrderDetails extends StatelessWidget {
CrossAxisAlignment.start,
children: [
Text(
ConstTexts.rideAndFareSummary.tr(),
ConstTexts.rideAndFareSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color:
@@ -590,9 +590,10 @@ class CabOrderDetails extends StatelessWidget {
.isNotEmpty
? ConstTexts
.updateReview
.tr()
: ConstTexts.addReview
.tr(),
.tr
: ConstTexts
.addReview
.tr,
onPress: () async {
final result = await Get.to(
() => CabReviewScreen(),
@@ -642,8 +643,7 @@ class CabOrderDetails extends StatelessWidget {
),
child: RoundedButtonFill(
borderRadius: 10.r,
title:
ConstTexts.complain.tr(),
title: ConstTexts.complain.tr,
onPress: () async {
Get.to(
() => ComplainScreen(),
@@ -721,7 +721,7 @@ class CabOrderDetails extends StatelessWidget {
InkWell(
onTap: () async {
ShowToastDialog.showLoader(
ConstTexts.pleaseWait.tr(),
ConstTexts.pleaseWait.tr,
);
UserModel? customer =
@@ -828,14 +828,14 @@ class CabOrderDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
_iconTile(
"${double.parse(controller.cabOrder.value.distance.toString()).toStringAsFixed(2)} ${ConstTexts.km.tr()}",
ConstTexts.distance.tr(),
"${double.parse(controller.cabOrder.value.distance.toString()).toStringAsFixed(2)} ${ConstTexts.km.tr}",
ConstTexts.distance.tr,
"assets/icons/ic_distance_parcel.svg",
isDark,
),
_iconTile(
controller.cabOrder.value.duration ?? '--',
ConstTexts.duration.tr(),
ConstTexts.duration.tr,
"assets/icons/ic_duration.svg",
isDark,
),
@@ -870,7 +870,7 @@ class CabOrderDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
ConstTexts.orderSummary.tr(),
ConstTexts.orderSummary.tr,
style: AppThemeData.boldTextStyle(
fontSize: 14,
color: AppThemeData.grey500,
@@ -880,7 +880,7 @@ class CabOrderDetails extends StatelessWidget {
// Subtotal
_summaryTile(
ConstTexts.subtotal.tr(),
ConstTexts.subtotal.tr,
Constant.amountShow(
amount: controller.subTotal.value.toString(),
),
@@ -889,7 +889,7 @@ class CabOrderDetails extends StatelessWidget {
// Discount
_summaryTile(
ConstTexts.discount.tr(),
ConstTexts.discount.tr,
Constant.amountShow(
amount: controller.discount.value.toString(),
),
@@ -939,7 +939,7 @@ class CabOrderDetails extends StatelessWidget {
// Total
_summaryTile(
ConstTexts.orderTotal.tr(),
ConstTexts.orderTotal.tr,
Constant.amountShow(
amount:
controller.totalAmount.value.toString(),
@@ -1004,7 +1004,7 @@ class CabOrderDetails extends StatelessWidget {
Text(
value,
style: AppThemeData.semiBoldTextStyle(
fontSize: title == ConstTexts.orderTotal.tr() ? 18 : 16,
fontSize: title == ConstTexts.orderTotal.tr ? 18 : 16,
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
),
),

View File

@@ -1,10 +1,10 @@
import 'package:customer/constant/const_texts.dart';
import 'package:customer/controllers/cab_review_controller.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../constant/constant.dart';
import '../../controllers/theme_controller.dart';
import '../../themes/app_them_data.dart';
@@ -37,8 +37,8 @@ class CabReviewScreen extends StatelessWidget {
),
title: Text(
controller.ratingModel.value != null
? ConstTexts.updateReview.tr()
: ConstTexts.addReview.tr(),
? ConstTexts.updateReview.tr
: ConstTexts.addReview.tr,
style: TextStyle(
color: isDark ? Colors.white : Colors.black,
fontSize: 16,
@@ -138,7 +138,7 @@ class CabReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 16),
child: Text(
ConstTexts.howWasTrip.tr(),
ConstTexts.howWasTrip.tr,
style: TextStyle(
fontSize: 18,
color:
@@ -153,7 +153,7 @@ class CabReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(
ConstTexts.yourFeedbackWillHelp.tr(),
ConstTexts.yourFeedbackWillHelp.tr,
textAlign: TextAlign.center,
style: TextStyle(
color:
@@ -171,7 +171,7 @@ class CabReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 20),
child: Text(
ConstTexts.rateFor.tr(),
ConstTexts.rateFor.tr,
style: TextStyle(
fontSize: 16,
color:
@@ -230,7 +230,7 @@ class CabReviewScreen extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(20.0),
child: TextFieldWidget(
hintText: ConstTexts.typeComment.tr(),
hintText: ConstTexts.typeComment.tr,
controller: controller.comment.value,
maxLine: 5,
),
@@ -244,8 +244,8 @@ class CabReviewScreen extends StatelessWidget {
title:
controller.ratingModel.value !=
null
? ConstTexts.updateReview.tr()
: ConstTexts.addReview.tr(),
? ConstTexts.updateReview.tr
: ConstTexts.addReview.tr,
color: AppThemeData.primary300,
textColor:
isDark

View File

@@ -1,8 +1,8 @@
import 'package:customer/constant/const_texts.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../controllers/complain_controller.dart';
import '../../controllers/theme_controller.dart';
import '../../themes/app_them_data.dart';
@@ -50,7 +50,7 @@ class ComplainScreen extends StatelessWidget {
),
const SizedBox(width: 10),
Text(
ConstTexts.complain.tr(),
ConstTexts.complain.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -69,16 +69,16 @@ class ComplainScreen extends StatelessWidget {
children: [
Obx(
() => TextFieldWidget(
title: ConstTexts.title.tr(),
hintText: ConstTexts.title.tr(),
title: ConstTexts.title.tr,
hintText: ConstTexts.title.tr,
controller: controller.title.value,
),
),
const SizedBox(height: 10),
Obx(
() => TextFieldWidget(
title: ConstTexts.complain.tr(),
hintText: ConstTexts.typeDescription.tr(),
title: ConstTexts.complain.tr,
hintText: ConstTexts.typeDescription.tr,
controller: controller.comment.value,
maxLine: 8,
),
@@ -86,7 +86,7 @@ class ComplainScreen extends StatelessWidget {
const SizedBox(height: 20),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.save.tr(),
title: ConstTexts.save.tr,
color: AppThemeData.primary300,
textColor: AppThemeData.grey50,
onPress: () => controller.submitComplain(),

View File

@@ -6,10 +6,11 @@ import 'package:customer/screen_ui/auth_screens/login_screen.dart';
import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_screen.dart';
import 'package:customer/themes/round_button_fill.dart';
import 'package:customer/themes/show_toast_dialog.dart';
import 'package:easy_localization/easy_localization.dart';
import 'package:customer/utils/app_router.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart' hide Trans;
import 'package:get/get.dart';
import '../../constant/constant.dart';
import '../../controllers/my_cab_booking_controller.dart';
import '../../controllers/theme_controller.dart';
@@ -46,7 +47,7 @@ class MyCabBookingScreen extends StatelessWidget {
children: [
const SizedBox(width: 10),
Text(
ConstTexts.rideHistory.tr(),
ConstTexts.rideHistory.tr,
style: AppThemeData.boldTextStyle(
fontSize: 18,
color: AppThemeData.grey900,
@@ -101,7 +102,7 @@ class MyCabBookingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
ConstTexts.plsLoginToAcc.tr(),
ConstTexts.plsLoginToAcc.tr,
style: TextStyle(
color:
isDark
@@ -113,7 +114,7 @@ class MyCabBookingScreen extends StatelessWidget {
),
const SizedBox(height: 5),
Text(
ConstTexts.youAreNotLoggedIn.tr(),
ConstTexts.youAreNotLoggedIn.tr,
textAlign: TextAlign.center,
style: TextStyle(
color:
@@ -127,7 +128,7 @@ class MyCabBookingScreen extends StatelessWidget {
const SizedBox(height: 20),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.login.tr(),
title: ConstTexts.login.tr,
width: 55,
height: 5.5,
color: AppThemeData.primary300,
@@ -147,7 +148,7 @@ class MyCabBookingScreen extends StatelessWidget {
if (orders.isEmpty) {
return Center(
child: Text(
ConstTexts.noOrderfound.tr(),
ConstTexts.noOrderfound.tr,
style: AppThemeData.mediumTextStyle(
color:
isDark
@@ -405,7 +406,7 @@ class MyCabBookingScreen extends StatelessWidget {
order.paymentStatus == false
? RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.payNow.tr(),
title: ConstTexts.payNow.tr,
onPress: () async {
controller
.selectedPaymentMethod
@@ -471,7 +472,7 @@ class MyCabBookingScreen extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
ConstTexts.selectPaymentMethod.tr(),
ConstTexts.selectPaymentMethod.tr,
style: AppThemeData.mediumTextStyle(
fontSize: 18,
color:
@@ -495,7 +496,7 @@ class MyCabBookingScreen extends StatelessWidget {
controller: scrollController,
children: [
Text(
ConstTexts.prefferedPayment.tr(),
ConstTexts.prefferedPayment.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -567,7 +568,7 @@ class MyCabBookingScreen extends StatelessWidget {
children: [
const SizedBox(height: 10),
Text(
ConstTexts.otherPaymentOptions.tr(),
ConstTexts.otherPaymentOptions.tr,
textAlign: TextAlign.start,
style: AppThemeData.boldTextStyle(
fontSize: 15,
@@ -716,13 +717,13 @@ class MyCabBookingScreen extends StatelessWidget {
),
RoundedButtonFill(
borderRadius: 10.r,
title: ConstTexts.continueT.tr(),
title: ConstTexts.continueT.tr,
color: AppThemeData.primary300,
textColor: AppThemeData.grey900,
onPress: () async {
if (controller.selectedPaymentMethod.value.isEmpty) {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
} else {
if (controller.selectedPaymentMethod.value ==
@@ -768,7 +769,7 @@ class MyCabBookingScreen extends StatelessWidget {
Constant.userModel!.walletAmount! <
controller.totalAmount.value) {
ShowToastDialog.showToast(
ConstTexts.youDoNothaveSufficientwalletBalance.tr(),
ConstTexts.youDoNothaveSufficientwalletBalance.tr,
);
} else {
controller.completeOrder();
@@ -804,7 +805,7 @@ class MyCabBookingScreen extends StatelessWidget {
if (value == null) {
Get.back();
ShowToastDialog.showToast(
ConstTexts.somethingWentWrong.tr(),
ConstTexts.somethingWentWrong.tr,
);
} else {
CreateRazorPayOrderModel result = value;
@@ -816,7 +817,7 @@ class MyCabBookingScreen extends StatelessWidget {
});
} else {
ShowToastDialog.showToast(
ConstTexts.plsSelectPaymentMethod.tr(),
ConstTexts.plsSelectPaymentMethod.tr,
);
}
}