BASE: Implement Localization In Cab Booking Screen.
@@ -46,7 +46,7 @@
|
|||||||
<application
|
<application
|
||||||
android:name="${applicationName}"
|
android:name="${applicationName}"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="customer"
|
android:label="Fondex"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher"
|
android:roundIcon="@mipmap/ic_launcher"
|
||||||
android:usesCleartextTraffic="true">
|
android:usesCleartextTraffic="true">
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 14 KiB |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
android/app/src/main/res/mipmap-ldpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
android/app/src/main/res/mipmap-ldpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 696 B |
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 23 KiB |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 45 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 77 KiB |
@@ -30,21 +30,40 @@
|
|||||||
"verify": "Verify",
|
"verify": "Verify",
|
||||||
"useYourMobileNumber": "Use your mobile number to Log in easily and securely.",
|
"useYourMobileNumber": "Use your mobile number to Log in easily and securely.",
|
||||||
"sendCode":"Send Code",
|
"sendCode":"Send Code",
|
||||||
"forgotPassword": "Forgot Password",
|
"serviceIsUnavailable": "Service is unavailable at the selected address.",
|
||||||
"login": "Log in",
|
"pickUpLocation": "Pickup Location",
|
||||||
"emailAddress": "Email Address*",
|
"destinationLocation": "Destination Location",
|
||||||
"password": "Password*",
|
"continueT":"Continue",
|
||||||
"enterPassword": "Enter password",
|
"plsSelectSourceLocation": "Please select source location",
|
||||||
"forgotPassword": "Forgot Password",
|
"plsSelectDestinationLocations": "Please select destination location",
|
||||||
"login": "Log in",
|
"selectVehicleType": "Select Your Vehicle Type",
|
||||||
"emailAddress": "Email Address*",
|
"plsSelectVehicleTypeFirst": "Please select a vehicle type first.",
|
||||||
"password": "Password*",
|
"plsSelectPaymentMethod": "Please select a payment method",
|
||||||
"enterPassword": "Enter password",
|
"insufficientWallet": "Insufficient wallet balance. Please select another payment method.",
|
||||||
"forgotPassword": "Forgot Password",
|
"promoCode": "Promo code",
|
||||||
"login": "Log in",
|
"thisOfferNotEligible": "This offer not eligible for this booking",
|
||||||
"emailAddress": "Email Address*",
|
"viewAll": "View All",
|
||||||
"password": "Password*",
|
"writeCoupon": "Write coupon Code",
|
||||||
"enterPassword": "Enter password",
|
"redeemNow": "Redeem now",
|
||||||
"forgotPassword": "Forgot Password",
|
"plsEnterCouponCode":"Please enter a coupon code",
|
||||||
"login": "Log in"
|
"couponApplied": "Coupon applied successfully",
|
||||||
|
"couponExpired": "This coupon code has been expired",
|
||||||
|
"invalidCouponCode": "Invalid coupon code",
|
||||||
|
"orderSummary": "Order Summary",
|
||||||
|
"subtotal": "Subtotal",
|
||||||
|
"discount": "Discount",
|
||||||
|
"orderTotal": "Order Total",
|
||||||
|
"confirmBooking": "Confirm Booking",
|
||||||
|
"waitingForDriver": "Waiting for driver....",
|
||||||
|
"cancelRide": "Cancel Ride",
|
||||||
|
"riderCancelledSucces": "Ride cancelled successfully",
|
||||||
|
"failedToCancel": "Failed to cancel ride",
|
||||||
|
"pleaseWait": "Please wait...",
|
||||||
|
"change": "Change",
|
||||||
|
"yourSosRequest": "Your SOS request has been submitted to admin",
|
||||||
|
"yourSosrequestAlreadySubmitted": "Your SOS request is already submitted",
|
||||||
|
"payNow": "Pay Now",
|
||||||
|
"youDoNothaveSufficientwalletBalance": "You do not have sufficient wallet balance",
|
||||||
|
"somethingWentWrong": "Something went wrong, please contact admin.",
|
||||||
|
"cash": "Cash"
|
||||||
}
|
}
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>Customer</string>
|
<string>Fondex</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
|||||||
@@ -29,11 +29,41 @@ class ConstTexts {
|
|||||||
static String verify = "verify";
|
static String verify = "verify";
|
||||||
static String useYourMobileNumber = "useYourMobileNumber";
|
static String useYourMobileNumber = "useYourMobileNumber";
|
||||||
static String sendCode = "sendCode";
|
static String sendCode = "sendCode";
|
||||||
static String loginToExplore = "logintoExplore";
|
static String serviceIsUnavailable = "serviceIsUnavailable";
|
||||||
static String emailAddress = "emailAddress";
|
static String pickUpLocation = "pickUpLocation";
|
||||||
static String password = "password";
|
static String destinationLocation = "destinationLocation";
|
||||||
static String loginToExplore = "logintoExplore";
|
static String continueT = "continue";
|
||||||
static String emailAddress = "emailAddress";
|
static String plsSelectSourceLocation = "plsSelectSourceLocation";
|
||||||
static String password = "password";
|
static String plsSelectDestinationLocations = "plsSelectDestinationLocations";
|
||||||
|
static String selectVehicleType = "selectVehicleType";
|
||||||
|
static String plsSelectVehicleTypeFirst = "plsSelectVehicleTypeFirst";
|
||||||
|
static String plsSelectPaymentMethod = "plsSelectPaymentMethod";
|
||||||
|
static String insufficientWallet = "insufficientWallet";
|
||||||
|
static String promoCode = "promoCode";
|
||||||
|
static String thisOfferNotEligible = "thisOfferNotEligible";
|
||||||
|
static String viewAll = "viewAll";
|
||||||
|
static String writeCoupon = "writeCoupon";
|
||||||
|
static String redeemNow = "redeemNow";
|
||||||
|
static String plsEnterCouponCode = "plsEnterCouponCode";
|
||||||
|
static String couponApplied = "couponApplied";
|
||||||
|
static String couponExpired = "couponExpired";
|
||||||
|
static String invalidCouponCode = "invalidCouponCode";
|
||||||
|
static String orderSummary = "orderSummary";
|
||||||
|
static String subtotal = "subtotal";
|
||||||
|
static String discount = "discount";
|
||||||
|
static String orderTotal = "orderTotal";
|
||||||
|
static String confirmBooking = "confirmBooking";
|
||||||
|
static String waitingForDriver = "waitingForDriver";
|
||||||
|
static String cancelRide = "cancelRide";
|
||||||
|
static String riderCancelledSucces = "riderCancelledSucces";
|
||||||
|
static String failedToCancel = "failedToCancel";
|
||||||
|
static String pleaseWait = "pleaseWait";
|
||||||
|
static String change = "change";
|
||||||
|
static String yourSosRequest = "yourSosRequest";
|
||||||
|
static String yourSosrequestAlreadySubmitted = "yourSosrequestAlreadySubmitted";
|
||||||
|
static String payNow = "payNow";
|
||||||
|
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
|
||||||
|
static String somethingWentWrong = "somethingWentWrong";
|
||||||
|
static String cash = "cash";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:customer/constant/const_texts.dart';
|
||||||
import 'package:customer/models/coupon_model.dart';
|
import 'package:customer/models/coupon_model.dart';
|
||||||
import 'package:customer/models/tax_model.dart';
|
import 'package:customer/models/tax_model.dart';
|
||||||
import 'package:customer/models/vehicle_type.dart';
|
import 'package:customer/models/vehicle_type.dart';
|
||||||
@@ -13,6 +14,7 @@ import 'package:customer/themes/round_button_border.dart';
|
|||||||
import 'package:customer/utils/network_image_widget.dart';
|
import 'package:customer/utils/network_image_widget.dart';
|
||||||
import 'package:customer/utils/utils.dart';
|
import 'package:customer/utils/utils.dart';
|
||||||
import 'package:dotted_border/dotted_border.dart';
|
import 'package:dotted_border/dotted_border.dart';
|
||||||
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
@@ -284,8 +286,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.setDepartureMarker(lat, lng);
|
controller.setDepartureMarker(lat, lng);
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Service is unavailable at the selected address."
|
ConstTexts.serviceIsUnavailable.tr(),
|
||||||
.tr,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,8 +319,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Service is unavailable at the selected address."
|
ConstTexts.serviceIsUnavailable.tr(),
|
||||||
.tr,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,7 +330,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller:
|
controller:
|
||||||
controller.sourceTextEditController.value,
|
controller.sourceTextEditController.value,
|
||||||
// backgroundColor: AppThemeData.cardColor,
|
// backgroundColor: AppThemeData.cardColor,
|
||||||
hintText: "Pickup Location".tr,
|
hintText: ConstTexts.pickUpLocation.tr(),
|
||||||
enable: false,
|
enable: false,
|
||||||
prefix: Padding(
|
prefix: Padding(
|
||||||
padding: EdgeInsets.only(left: 10, right: 10),
|
padding: EdgeInsets.only(left: 10, right: 10),
|
||||||
@@ -394,7 +394,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.value,
|
.value,
|
||||||
// backgroundColor: AppThemeData.grey50,
|
// backgroundColor: AppThemeData.grey50,
|
||||||
// borderColor: AppThemeData.grey50,
|
// borderColor: AppThemeData.grey50,
|
||||||
hintText: "Destination Location".tr,
|
hintText: ConstTexts.destinationLocation.tr(),
|
||||||
// backgroundColor: AppThemeData.cardColor,
|
// backgroundColor: AppThemeData.cardColor,
|
||||||
enable: false,
|
enable: false,
|
||||||
prefix: const Padding(
|
prefix: const Padding(
|
||||||
@@ -431,7 +431,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
SizedBox(height: 15),
|
SizedBox(height: 15),
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Continue".tr,
|
title: ConstTexts.continueT.tr(),
|
||||||
onPress: () {
|
onPress: () {
|
||||||
if (controller
|
if (controller
|
||||||
.sourceTextEditController
|
.sourceTextEditController
|
||||||
@@ -439,7 +439,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.text
|
.text
|
||||||
.isEmpty) {
|
.isEmpty) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please select source location".tr,
|
ConstTexts.plsSelectSourceLocation.tr(),
|
||||||
);
|
);
|
||||||
} else if (controller
|
} else if (controller
|
||||||
.destinationTextEditController
|
.destinationTextEditController
|
||||||
@@ -447,7 +447,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.text
|
.text
|
||||||
.isEmpty) {
|
.isEmpty) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please select destination location".tr,
|
ConstTexts.plsSelectDestinationLocations.tr(),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
controller.bottomSheetType.value = "vehicleSelection";
|
controller.bottomSheetType.value = "vehicleSelection";
|
||||||
@@ -506,7 +506,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
|
padding: EdgeInsetsGeometry.symmetric(horizontal: 16.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Select Your Vehicle Type",
|
ConstTexts.selectVehicleType.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
color:
|
color:
|
||||||
@@ -689,7 +689,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.bottomSheetType.value = "payment";
|
controller.bottomSheetType.value = "payment";
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please select a vehicle type first.".tr,
|
ConstTexts.plsSelectVehicleTypeFirst.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -909,13 +909,13 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Continue".tr,
|
title: ConstTexts.continueT.tr(),
|
||||||
color: AppThemeData.mainColor,
|
color: AppThemeData.mainColor,
|
||||||
textColor: AppThemeData.grey50,
|
textColor: AppThemeData.grey50,
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
if (controller.selectedPaymentMethod.value.isEmpty) {
|
if (controller.selectedPaymentMethod.value.isEmpty) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please select a payment method".tr,
|
ConstTexts.plsSelectPaymentMethod.tr(),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -924,8 +924,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.userModel.value.walletAmount ?? 0;
|
controller.userModel.value.walletAmount ?? 0;
|
||||||
if (walletAmount <= 0) {
|
if (walletAmount <= 0) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Insufficient wallet balance. Please select another payment method."
|
ConstTexts.insufficientWallet.tr(),
|
||||||
.tr,
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1064,7 +1063,8 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller
|
controller
|
||||||
.sourceTextEditController
|
.sourceTextEditController
|
||||||
.value,
|
.value,
|
||||||
hintText: "Pickup Location".tr,
|
hintText:
|
||||||
|
ConstTexts.pickUpLocation.tr(),
|
||||||
enable: false,
|
enable: false,
|
||||||
prefix: const Padding(
|
prefix: const Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -1146,7 +1146,9 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.value,
|
.value,
|
||||||
// backgroundColor: AppThemeData.grey50,
|
// backgroundColor: AppThemeData.grey50,
|
||||||
// borderColor: AppThemeData.grey50,
|
// borderColor: AppThemeData.grey50,
|
||||||
hintText: "Destination Location".tr,
|
hintText:
|
||||||
|
ConstTexts.destinationLocation
|
||||||
|
.tr(),
|
||||||
enable: false,
|
enable: false,
|
||||||
prefix: const Padding(
|
prefix: const Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -1193,7 +1195,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
"Promo code".tr,
|
ConstTexts.promoCode.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -1227,15 +1229,15 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.calculateTotalAmount();
|
controller.calculateTotalAmount();
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"This offer not eligible for this booking"
|
ConstTexts.thisOfferNotEligible
|
||||||
.tr,
|
.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
"View All".tr,
|
ConstTexts.viewAll.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -1296,7 +1298,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: InputBorder.none,
|
border: InputBorder.none,
|
||||||
hintText:
|
hintText:
|
||||||
'Write coupon Code'.tr,
|
ConstTexts.writeCoupon.tr(),
|
||||||
contentPadding: EdgeInsets.only(
|
contentPadding: EdgeInsets.only(
|
||||||
bottom: 10,
|
bottom: 10,
|
||||||
),
|
),
|
||||||
@@ -1313,7 +1315,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Redeem now".tr,
|
title: ConstTexts.redeemNow.tr(),
|
||||||
width: 27.w,
|
width: 27.w,
|
||||||
fontSizes: 14,
|
fontSizes: 14,
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
@@ -1324,7 +1326,8 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.trim()
|
.trim()
|
||||||
.isEmpty) {
|
.isEmpty) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please enter a coupon code".tr,
|
ConstTexts.plsEnterCouponCode
|
||||||
|
.tr(),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1376,25 +1379,26 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller
|
controller
|
||||||
.calculateTotalAmount();
|
.calculateTotalAmount();
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Coupon applied successfully"
|
ConstTexts.couponApplied
|
||||||
.tr,
|
.tr(),
|
||||||
);
|
);
|
||||||
controller.update();
|
controller.update();
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"This offer not eligible for this booking"
|
ConstTexts
|
||||||
.tr,
|
.thisOfferNotEligible
|
||||||
|
.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"This coupon code has been expired"
|
ConstTexts.couponExpired.tr(),
|
||||||
.tr,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Invalid coupon code".tr,
|
ConstTexts.invalidCouponCode
|
||||||
|
.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1427,7 +1431,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Order Summary".tr,
|
ConstTexts.orderSummary.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color:
|
color:
|
||||||
@@ -1447,7 +1451,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Subtotal".tr,
|
ConstTexts.subtotal.tr(),
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -1485,7 +1489,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Discount".tr,
|
ConstTexts.discount.tr(),
|
||||||
style:
|
style:
|
||||||
AppThemeData.mediumTextStyle(
|
AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -1547,8 +1551,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})'
|
'${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})',
|
||||||
.tr,
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style:
|
style:
|
||||||
AppThemeData.mediumTextStyle(
|
AppThemeData.mediumTextStyle(
|
||||||
@@ -1576,7 +1579,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.toString(),
|
.toString(),
|
||||||
taxModel: taxModel,
|
taxModel: taxModel,
|
||||||
).toString(),
|
).toString(),
|
||||||
).tr,
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style:
|
style:
|
||||||
AppThemeData.semiBoldTextStyle(
|
AppThemeData.semiBoldTextStyle(
|
||||||
@@ -1605,7 +1608,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Order Total".tr,
|
ConstTexts.orderTotal.tr(),
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -1781,10 +1784,8 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.selectedPaymentMethod.value ==
|
controller.selectedPaymentMethod.value ==
|
||||||
"cod"
|
"cod"
|
||||||
? "Наличными"
|
? "Наличными"
|
||||||
: controller
|
: controller.selectedPaymentMethod.value
|
||||||
.selectedPaymentMethod
|
.tr(),
|
||||||
.value
|
|
||||||
.tr,
|
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -1802,7 +1803,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Confirm Booking".tr,
|
title: ConstTexts.confirmBooking.tr(),
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
controller.placeOrder();
|
controller.placeOrder();
|
||||||
},
|
},
|
||||||
@@ -1858,7 +1859,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
SizedBox(height: 30),
|
SizedBox(height: 30),
|
||||||
Text(
|
Text(
|
||||||
"Waiting for driver....".tr,
|
ConstTexts.waitingForDriver.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 18.sp,
|
fontSize: 18.sp,
|
||||||
color:
|
color:
|
||||||
@@ -1870,7 +1871,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
Image.asset('assets/loader.gif', width: 250),
|
Image.asset('assets/loader.gif', width: 250),
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Cancel Ride".tr,
|
title: ConstTexts.cancelRide.tr(),
|
||||||
color: AppThemeData.mainColor,
|
color: AppThemeData.mainColor,
|
||||||
textColor: AppThemeData.surface,
|
textColor: AppThemeData.surface,
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
@@ -1917,7 +1918,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
await FireStoreUtils.updateUser(Constant.userModel!);
|
await FireStoreUtils.updateUser(Constant.userModel!);
|
||||||
}
|
}
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Ride cancelled successfully".tr,
|
ConstTexts.riderCancelledSucces.tr(),
|
||||||
);
|
);
|
||||||
// Get.offAll(const CabDashboardScreen());
|
// Get.offAll(const CabDashboardScreen());
|
||||||
Get.back();
|
Get.back();
|
||||||
@@ -1926,7 +1927,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
cabDashboardController.selectedIndex.value = 0;
|
cabDashboardController.selectedIndex.value = 0;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ShowToastDialog.showToast("Failed to cancel ride".tr);
|
ShowToastDialog.showToast(ConstTexts.failedToCancel.tr());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
@@ -2021,7 +2022,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller
|
controller
|
||||||
.sourceTextEditController
|
.sourceTextEditController
|
||||||
.value,
|
.value,
|
||||||
hintText: "Pickup Location".tr,
|
hintText: ConstTexts.pickUpLocation.tr(),
|
||||||
enable: false,
|
enable: false,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
prefix: const Padding(
|
prefix: const Padding(
|
||||||
@@ -2068,7 +2069,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.value,
|
.value,
|
||||||
// backgroundColor: AppThemeData.grey50,
|
// backgroundColor: AppThemeData.grey50,
|
||||||
// borderColor: AppThemeData.grey50,
|
// borderColor: AppThemeData.grey50,
|
||||||
hintText: "Destination Location".tr,
|
hintText: ConstTexts.destinationLocation.tr(),
|
||||||
enable: false,
|
enable: false,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
prefix: const Padding(
|
prefix: const Padding(
|
||||||
@@ -2118,7 +2119,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Otp :".tr,
|
"Otp :",
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -2281,7 +2282,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
InkWell(
|
InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
ShowToastDialog.showLoader(
|
ShowToastDialog.showLoader(
|
||||||
"Please wait...".tr,
|
ConstTexts.pleaseWait.tr(),
|
||||||
);
|
);
|
||||||
|
|
||||||
UserModel? customer =
|
UserModel? customer =
|
||||||
@@ -2480,7 +2481,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
SizedBox(width: 22),
|
SizedBox(width: 22),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
controller.selectedPaymentMethod.value.tr,
|
controller.selectedPaymentMethod.value,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -2492,7 +2493,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
"Change".tr,
|
ConstTexts.change.tr(),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -2526,7 +2527,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Order Summary".tr,
|
ConstTexts.orderSummary.tr(),
|
||||||
style: AppThemeData.boldTextStyle(
|
style: AppThemeData.boldTextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color:
|
color:
|
||||||
@@ -2546,7 +2547,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Subtotal".tr,
|
ConstTexts.subtotal.tr(),
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -2582,7 +2583,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Discount".tr,
|
ConstTexts.discount.tr(),
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -2621,7 +2622,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
'${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})'
|
'${taxModel.title} (${taxModel.tax} ${taxModel.type == "Fixed" ? Constant.currencyData!.code : "%"})'
|
||||||
.tr,
|
,
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
@@ -2646,7 +2647,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
.toString(),
|
.toString(),
|
||||||
taxModel: taxModel,
|
taxModel: taxModel,
|
||||||
).toString(),
|
).toString(),
|
||||||
).tr,
|
),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.semiBoldTextStyle(
|
style: AppThemeData.semiBoldTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@@ -2672,7 +2673,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Order Total".tr,
|
ConstTexts.orderTotal.tr(),
|
||||||
style: AppThemeData.mediumTextStyle(
|
style: AppThemeData.mediumTextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
@@ -2713,13 +2714,13 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
RoundedButtonFill(
|
RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "SOS".tr,
|
title: "SOS",
|
||||||
color: Colors.red.withValues(alpha: 0.50),
|
color: Colors.red.withValues(alpha: 0.50),
|
||||||
textColor: AppThemeData.grey50,
|
textColor: AppThemeData.grey50,
|
||||||
isCenter: true,
|
isCenter: true,
|
||||||
icon: const Icon(Icons.call, color: Colors.white),
|
icon: const Icon(Icons.call, color: Colors.white),
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
ShowToastDialog.showLoader("Please wait...".tr);
|
ShowToastDialog.showLoader(ConstTexts.pleaseWait.tr());
|
||||||
|
|
||||||
LocationData location =
|
LocationData location =
|
||||||
await controller.currentLocation.value
|
await controller.currentLocation.value
|
||||||
@@ -2740,8 +2741,8 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
"Your SOS request has been submitted to admin"
|
ConstTexts.yourSosRequest.tr()
|
||||||
.tr,
|
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
duration: Duration(seconds: 3),
|
duration: Duration(seconds: 3),
|
||||||
@@ -2753,8 +2754,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
"Your SOS request is already submitted"
|
ConstTexts.yourSosrequestAlreadySubmitted.tr()
|
||||||
.tr,
|
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.red,
|
backgroundColor: Colors.red,
|
||||||
duration: Duration(seconds: 3),
|
duration: Duration(seconds: 3),
|
||||||
@@ -2777,7 +2777,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
controller.currentOrder.value.paymentStatus == false) {
|
controller.currentOrder.value.paymentStatus == false) {
|
||||||
return RoundedButtonFill(
|
return RoundedButtonFill(
|
||||||
borderRadius: 10.r,
|
borderRadius: 10.r,
|
||||||
title: "Pay Now".tr,
|
title: ConstTexts.payNow.tr(),
|
||||||
onPress: () async {
|
onPress: () async {
|
||||||
if (controller.selectedPaymentMethod.value ==
|
if (controller.selectedPaymentMethod.value ==
|
||||||
PaymentGateway.stripe.name) {
|
PaymentGateway.stripe.name) {
|
||||||
@@ -2822,7 +2822,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
Constant.userModel!.walletAmount! <
|
Constant.userModel!.walletAmount! <
|
||||||
controller.totalAmount.value) {
|
controller.totalAmount.value) {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"You do not have sufficient wallet balance".tr,
|
ConstTexts.youDoNothaveSufficientwalletBalance.tr()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
controller.completeOrder();
|
controller.completeOrder();
|
||||||
@@ -2858,8 +2858,8 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
if (value == null) {
|
if (value == null) {
|
||||||
Get.back();
|
Get.back();
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Something went wrong, please contact admin."
|
|
||||||
.tr,
|
ConstTexts.somethingWentWrong.tr()
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
CreateRazorPayOrderModel result = value;
|
CreateRazorPayOrderModel result = value;
|
||||||
@@ -2873,7 +2873,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
ShowToastDialog.showToast(
|
ShowToastDialog.showToast(
|
||||||
"Please select payment method".tr,
|
ConstTexts.plsSelectPaymentMethod.tr(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3007,7 +3007,7 @@ class CabBookingScreen extends StatelessWidget {
|
|||||||
: Expanded(
|
: Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
value.name == "cod"
|
value.name == "cod"
|
||||||
? "Наличными"
|
? ConstTexts.cash.tr()
|
||||||
: value.name.capitalizeString(),
|
: value.name.capitalizeString(),
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: AppThemeData.semiBoldTextStyle(
|
style: AppThemeData.semiBoldTextStyle(
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
name: customer
|
name: customer
|
||||||
description: "A new Flutter project."
|
description: "A new Flutter project."
|
||||||
|
|
||||||
version: 1.0.0+2
|
version: 1.0.0+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.7.2
|
sdk: ^3.7.2
|
||||||
|
|||||||