BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -4,9 +4,10 @@ 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/screen_ui/rental_service/rental_order_details_screen.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/my_rental_booking_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -38,7 +39,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Rental History".tr(),
|
||||
"Rental History".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -75,7 +76,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Please Log In to Continue".tr(),
|
||||
"Please Log In to Continue".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -88,7 +89,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"You’re not logged in. Please sign in to access your account and explore all features."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -101,7 +102,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Log in".tr(),
|
||||
title: "Log in".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -122,7 +123,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
if (orders.isEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"No orders found".tr(),
|
||||
"No orders found".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -272,7 +273,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"Vehicle Type :".tr(),
|
||||
"Vehicle Type :".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -387,7 +388,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Package info :".tr(),
|
||||
"Package info :".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -471,7 +472,7 @@ class MyRentalBookingScreen extends StatelessWidget {
|
||||
.isEnableOTPTripStartForRental ==
|
||||
true)
|
||||
Text(
|
||||
"${'OTP :'.tr()} ${order.otpCode}",
|
||||
"${'OTP :'.tr} ${order.otpCode}",
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
|
||||
@@ -4,10 +4,10 @@ import 'package:customer/screen_ui/rental_service/rental_coupon_screen.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/rental_conformation_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../themes/app_them_data.dart';
|
||||
@@ -56,7 +56,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Confirm Rent a Car".tr(),
|
||||
"Confirm Rent a Car".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -156,7 +156,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Your Preference".tr(),
|
||||
"Your Preference".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -256,7 +256,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Vehicle Type".tr(),
|
||||
"Vehicle Type".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -330,7 +330,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Coupons".tr(),
|
||||
"Coupons".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -359,14 +359,14 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"This offer not eligible for this booking"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
"View All".tr(),
|
||||
"View All".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
decoration: TextDecoration.underline,
|
||||
fontSize: 14,
|
||||
@@ -416,7 +416,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
color: AppThemeData.grey900,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "Write coupon code".tr(),
|
||||
hintText: "Write coupon code".tr,
|
||||
hintStyle: AppThemeData.mediumTextStyle(
|
||||
fontSize: 16,
|
||||
color: AppThemeData.parcelService500,
|
||||
@@ -426,7 +426,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
title: "Redeem now".tr(),
|
||||
title: "Redeem now".tr,
|
||||
onPress: () {
|
||||
if (controller.couponList
|
||||
.where(
|
||||
@@ -470,18 +470,18 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"This offer not eligible for this booking"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"This coupon code has been expired"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Invalid coupon code".tr(),
|
||||
"Invalid coupon code".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -516,7 +516,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Order Summary".tr(),
|
||||
"Order Summary".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey500,
|
||||
@@ -526,7 +526,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
|
||||
// Subtotal
|
||||
_summaryTile(
|
||||
"Subtotal".tr(),
|
||||
"Subtotal".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.subTotal.value.toString(),
|
||||
@@ -537,7 +537,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
|
||||
// Discount
|
||||
_summaryTile(
|
||||
"Discount".tr(),
|
||||
"Discount".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.discount.value.toString(),
|
||||
@@ -590,7 +590,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
|
||||
// Total
|
||||
_summaryTile(
|
||||
"Order Total".tr(),
|
||||
"Order Total".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.totalAmount.value.toString(),
|
||||
@@ -603,7 +603,7 @@ class RentalConformationScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Book now".tr(),
|
||||
title: "Book now".tr,
|
||||
onPress: () {
|
||||
controller.placeOrder();
|
||||
},
|
||||
|
||||
@@ -6,9 +6,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 RentalCouponScreen extends StatelessWidget {
|
||||
const RentalCouponScreen({super.key});
|
||||
@@ -51,7 +51,7 @@ class RentalCouponScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Coupon".tr(),
|
||||
"Coupon".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -65,7 +65,7 @@ class RentalCouponScreen extends StatelessWidget {
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.cabCouponList.isEmpty
|
||||
? Constant.showEmptyView(message: "Coupon not found".tr())
|
||||
? Constant.showEmptyView(message: "Coupon not found".tr)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemCount: controller.cabCouponList.length,
|
||||
@@ -108,7 +108,7 @@ class RentalCouponScreen extends StatelessWidget {
|
||||
child: RotatedBox(
|
||||
quarterTurns: -1,
|
||||
child: Text(
|
||||
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
|
||||
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -179,7 +179,7 @@ class RentalCouponScreen extends StatelessWidget {
|
||||
Get.back(result: couponModel);
|
||||
},
|
||||
child: Text(
|
||||
"Tap To Apply".tr(),
|
||||
"Tap To Apply".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
|
||||
@@ -2,10 +2,10 @@ 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_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/cab_rental_dashboard_controllers.dart';
|
||||
|
||||
class RentalDashboardScreen extends StatelessWidget {
|
||||
@@ -52,21 +52,21 @@ class RentalDashboardScreen extends StatelessWidget {
|
||||
isDark,
|
||||
index: 0,
|
||||
assetIcon: "assets/icons/ic_home_cab.svg",
|
||||
label: 'Home'.tr(),
|
||||
label: 'Home'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 1,
|
||||
assetIcon: "assets/icons/ic_booking_cab.svg",
|
||||
label: 'My Bookings'.tr(),
|
||||
label: 'My Bookings'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 2,
|
||||
assetIcon: "assets/icons/ic_profile.svg",
|
||||
label: 'Profile'.tr(),
|
||||
label: 'Profile'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
]
|
||||
@@ -75,28 +75,28 @@ class RentalDashboardScreen extends StatelessWidget {
|
||||
isDark,
|
||||
index: 0,
|
||||
assetIcon: "assets/icons/ic_home_cab.svg",
|
||||
label: 'Home'.tr(),
|
||||
label: 'Home'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 1,
|
||||
assetIcon: "assets/icons/ic_booking_cab.svg",
|
||||
label: 'My Bookings'.tr(),
|
||||
label: 'My Bookings'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 2,
|
||||
assetIcon: "assets/icons/ic_wallet_cab.svg",
|
||||
label: 'Wallet'.tr(),
|
||||
label: 'Wallet'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 3,
|
||||
assetIcon: "assets/icons/ic_profile.svg",
|
||||
label: 'Profile'.tr(),
|
||||
label: 'Profile'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/rental_home_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../models/rental_vehicle_type.dart';
|
||||
@@ -71,7 +72,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
Get.offAll(const LoginScreen());
|
||||
},
|
||||
child: Text(
|
||||
"Login".tr(),
|
||||
"Login".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -131,7 +132,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Service is unavailable at the selected address."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -167,7 +168,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Service is unavailable at the selected address."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -178,8 +179,8 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
child: TextFieldWidget(
|
||||
controller:
|
||||
controller.sourceTextEditController.value,
|
||||
hintText: "Your current location".tr(),
|
||||
title: "Pickup Location".tr(),
|
||||
hintText: "Your current location".tr,
|
||||
title: "Pickup Location".tr,
|
||||
enable: false,
|
||||
prefix: Padding(
|
||||
padding: EdgeInsets.only(left: 10, right: 10),
|
||||
@@ -196,7 +197,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Select Your Vehicle Type".tr(),
|
||||
"Select Your Vehicle Type".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -407,20 +408,20 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
onPress: () async {
|
||||
final sourceText =
|
||||
controller.sourceTextEditController.value.text
|
||||
.trim();
|
||||
if (Constant.userModel == null) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please login to continue".tr(),
|
||||
"Please login to continue".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
if (sourceText.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select source location".tr(),
|
||||
"Please select source location".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -428,7 +429,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
if (controller.selectedVehicleType.value ==
|
||||
null) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a vehicle type".tr(),
|
||||
"Please select a vehicle type".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -438,7 +439,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
if (controller.rentalPackages.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"No preference available for the selected vehicle type"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -502,7 +503,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
"Select Preferences".tr(),
|
||||
"Select Preferences".tr,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
@@ -627,7 +628,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
onPress: () {
|
||||
Get.bottomSheet(
|
||||
paymentBottomSheet(context, controller, isDark),
|
||||
@@ -675,7 +676,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Select Payment Method".tr(),
|
||||
"Select Payment Method".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -699,7 +700,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
controller: scrollController,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr(),
|
||||
"Preferred Payment".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -772,7 +773,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Other Payment Options".tr(),
|
||||
"Other Payment Options".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -923,13 +924,13 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
|
||||
// Continue button
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
if (controller.selectedPaymentMethod.value.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a payment method".tr(),
|
||||
"Please select a payment method".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -948,7 +949,7 @@ class RentalHomeScreen extends StatelessWidget {
|
||||
|
||||
if (walletAmount < baseFare) {
|
||||
ShowToastDialog.showToast(
|
||||
"You do not have sufficient wallet balance".tr(),
|
||||
"You do not have sufficient wallet balance".tr,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ import 'package:customer/screen_ui/rental_service/rental_review_screen.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/rental_order_details_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../models/user_model.dart';
|
||||
@@ -64,7 +64,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Order Details".tr(),
|
||||
"Order Details".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -110,7 +110,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${'Booking Id :'.tr()} ${controller.order.value.id}",
|
||||
"${'Booking Id :'.tr} ${controller.order.value.id}",
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
@@ -134,7 +134,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
);
|
||||
ShowToastDialog.showToast(
|
||||
"Booking ID copied to clipboard"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
},
|
||||
child: Icon(Icons.copy),
|
||||
@@ -233,7 +233,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Your Preference".tr(),
|
||||
"Your Preference".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -344,7 +344,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"About Driver".tr(),
|
||||
"About Driver".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -496,8 +496,8 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
.value
|
||||
.id!
|
||||
.isNotEmpty
|
||||
? 'Update Review'.tr()
|
||||
: 'Add Review'.tr(),
|
||||
? 'Update Review'.tr
|
||||
: 'Add Review'.tr,
|
||||
onPress: () async {
|
||||
final result = await Get.to(
|
||||
() =>
|
||||
@@ -588,7 +588,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
|
||||
UserModel? customer =
|
||||
@@ -703,7 +703,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Vehicle Type".tr(),
|
||||
"Vehicle Type".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -808,7 +808,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Rental Details".tr(),
|
||||
"Rental Details".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -831,7 +831,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Rental Package'.tr(),
|
||||
'Rental Package'.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -852,7 +852,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
.rentalPackageModel!
|
||||
.name
|
||||
.toString()
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.boldTextStyle(
|
||||
@@ -876,7 +876,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Rental Package Price'.tr(),
|
||||
'Rental Package Price'.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -899,7 +899,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
.rentalPackageModel!
|
||||
.baseFare
|
||||
.toString(),
|
||||
).tr(),
|
||||
).tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.boldTextStyle(
|
||||
@@ -923,7 +923,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${'Including'.tr()} ${Constant.distanceType.tr()}',
|
||||
'${'Including'.tr} ${Constant.distanceType.tr}',
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -939,7 +939,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"${controller.order.value.rentalPackageModel!.includedDistance.toString()} ${Constant.distanceType}"
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.boldTextStyle(
|
||||
@@ -963,7 +963,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Including Hours'.tr(),
|
||||
'Including Hours'.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -978,8 +978,8 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${controller.order.value.rentalPackageModel!.includedHours.toString()} ${'Hr'.tr()}"
|
||||
.tr(),
|
||||
"${controller.order.value.rentalPackageModel!.includedHours.toString()} ${'Hr'.tr}"
|
||||
.tr,
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.boldTextStyle(
|
||||
@@ -1003,7 +1003,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${'Extra'.tr()} ${Constant.distanceType}',
|
||||
'${'Extra'.tr} ${Constant.distanceType}',
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -1065,7 +1065,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'Extra Minutes'.tr(),
|
||||
'Extra Minutes'.tr,
|
||||
textAlign:
|
||||
TextAlign.start,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
@@ -1080,7 +1080,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${controller.order.value.endTime == null ? "0" : (((controller.order.value.endTime!.toDate().difference(controller.order.value.startTime!.toDate()).inMinutes) - (int.parse(controller.order.value.rentalPackageModel!.includedHours.toString()) * 60)).clamp(0, double.infinity).toInt().toString())} ${'Min'.tr()}",
|
||||
"${controller.order.value.endTime == null ? "0" : (((controller.order.value.endTime!.toDate().difference(controller.order.value.startTime!.toDate()).inMinutes) - (int.parse(controller.order.value.rentalPackageModel!.includedHours.toString()) * 60)).clamp(0, double.infinity).toInt().toString())} ${'Min'.tr}",
|
||||
textAlign: TextAlign.start,
|
||||
style:
|
||||
AppThemeData.boldTextStyle(
|
||||
@@ -1121,7 +1121,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Order Summary".tr(),
|
||||
"Order Summary".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey500,
|
||||
@@ -1130,7 +1130,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 8),
|
||||
|
||||
_summaryTile(
|
||||
"Subtotal".tr(),
|
||||
"Subtotal".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.subTotal.value
|
||||
@@ -1140,7 +1140,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
null,
|
||||
),
|
||||
_summaryTile(
|
||||
"Discount".tr(),
|
||||
"Discount".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.discount.value
|
||||
@@ -1189,7 +1189,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
|
||||
const Divider(),
|
||||
_summaryTile(
|
||||
"Order Total".tr(),
|
||||
"Order Total".tr,
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.totalAmount.value
|
||||
@@ -1237,7 +1237,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"You are not able to pay now until driver adds kilometer"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else {
|
||||
Get.bottomSheet(
|
||||
@@ -1338,7 +1338,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Select Payment Method".tr(),
|
||||
"Select Payment Method".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -1362,7 +1362,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
controller: scrollController,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr(),
|
||||
"Preferred Payment".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
@@ -1434,7 +1434,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Other Payment Options".tr(),
|
||||
"Other Payment Options".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
@@ -1582,13 +1582,13 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
if (controller.selectedPaymentMethod.value.isEmpty) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select a payment method".tr(),
|
||||
"Please select a payment method".tr,
|
||||
);
|
||||
} else {
|
||||
if (controller.selectedPaymentMethod.value ==
|
||||
@@ -1634,7 +1634,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
Constant.userModel!.walletAmount! <
|
||||
controller.totalAmount.value) {
|
||||
ShowToastDialog.showToast(
|
||||
"You do not have sufficient wallet balance".tr(),
|
||||
"You do not have sufficient wallet balance".tr,
|
||||
);
|
||||
} else {
|
||||
controller.completeOrder();
|
||||
@@ -1674,7 +1674,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
Get.back();
|
||||
ShowToastDialog.showToast(
|
||||
"Something went wrong, please contact admin."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else {
|
||||
CreateRazorPayOrderModel result = value;
|
||||
@@ -1686,7 +1686,7 @@ class RentalOrderDetailsScreen extends StatelessWidget {
|
||||
});
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select payment method".tr(),
|
||||
"Please select payment method".tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/rental_review_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -35,8 +34,8 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
),
|
||||
title: Text(
|
||||
controller.ratingModel.value != null
|
||||
? "Update Review".tr()
|
||||
: "Add Review".tr(),
|
||||
? "Update Review".tr
|
||||
: "Add Review".tr,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
fontSize: 16,
|
||||
@@ -136,7 +135,7 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 16),
|
||||
child: Text(
|
||||
'How is your trip?'.tr(),
|
||||
'How is your trip?'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -152,7 +151,7 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text(
|
||||
'Your feedback will help us improve \n driving experience better'
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -170,7 +169,7 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: Text(
|
||||
'Rate for'.tr(),
|
||||
'Rate for'.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -229,7 +228,7 @@ class RentalReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: TextFieldWidget(
|
||||
hintText: "Type comment....".tr(),
|
||||
hintText: "Type comment....".tr,
|
||||
controller: controller.comment.value,
|
||||
maxLine: 5,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user