BASE: Implement Localization In Cab Order Details Screen.
This commit is contained in:
@@ -77,5 +77,15 @@
|
||||
"everyRideVerified": "Every Ride. Every Driver. Verified.",
|
||||
"allDriversIDCheck": "All drivers go through ID checks and background verification for your safety.",
|
||||
"intercity": "Intercity",
|
||||
"aroundTheCity": "Around the city"
|
||||
"aroundTheCity": "Around the city",
|
||||
"rideDetails": "Ride Details",
|
||||
"orderId": "Order Id:",
|
||||
"bookingData": "Booking Date:",
|
||||
"rideAndFareSummary": "Ride & Fare Summary",
|
||||
"updateReview": "Update Review",
|
||||
"addReview": "Add Review",
|
||||
"complain": "Complain",
|
||||
"distance": "Distance",
|
||||
"km": "KM",
|
||||
"duration": "Duration"
|
||||
}
|
||||
@@ -77,8 +77,50 @@ class ConstTexts {
|
||||
static String allDriversIDCheck = "allDriversIDCheck";
|
||||
static String intercity = "intercity";
|
||||
static String aroundTheCity = "aroundTheCity";
|
||||
static String rideDetails = "rideDetails";
|
||||
static String orderId = "orderId";
|
||||
static String bookingData = "bookingData";
|
||||
static String rideAndFareSummary = "rideAndFareSummary";
|
||||
static String updateReview = "updateReview";
|
||||
static String addReview = "addReview";
|
||||
static String complain = "complain";
|
||||
static String distance = "distance";
|
||||
static String km = "km";
|
||||
static String duration = "duration";
|
||||
static String couponNotFound = "couponNotFound";
|
||||
static String tapToApply = "tapToApply";
|
||||
static String home = "home";
|
||||
static String myBookings = "myBookings";
|
||||
static String profile = "profile";
|
||||
static String wallet = "wallet";
|
||||
static String cabServiceType = "cabServiceType";
|
||||
static String everyRideVerified = "everyRideVerified";
|
||||
static String allDriversIDCheck = "allDriversIDCheck";
|
||||
static String intercity = "intercity";
|
||||
static String aroundTheCity = "aroundTheCity";
|
||||
static String rideDetails = "rideDetails";
|
||||
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
|
||||
static String somethingWentWrong = "somethingWentWrong";
|
||||
static String cash = "cash";
|
||||
static String yourSosrequestAlreadySubmitted = "yourSosrequestAlreadySubmitted";
|
||||
static String payNow = "payNow";
|
||||
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
|
||||
static String somethingWentWrong = "somethingWentWrong";
|
||||
static String cash = "cash";
|
||||
static String coupon = "coupon";
|
||||
static String couponNotFound = "couponNotFound";
|
||||
static String tapToApply = "tapToApply";
|
||||
static String home = "home";
|
||||
static String myBookings = "myBookings";
|
||||
static String profile = "profile";
|
||||
static String wallet = "wallet";
|
||||
static String cabServiceType = "cabServiceType";
|
||||
static String everyRideVerified = "everyRideVerified";
|
||||
static String allDriversIDCheck = "allDriversIDCheck";
|
||||
static String intercity = "intercity";
|
||||
static String aroundTheCity = "aroundTheCity";
|
||||
static String rideDetails = "rideDetails";
|
||||
static String youDoNothaveSufficientwalletBalance = "youDoNothaveSufficientwalletBalance";
|
||||
static String somethingWentWrong = "somethingWentWrong";
|
||||
static String cash = "cash";
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
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';
|
||||
@@ -62,7 +64,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Ride Details".tr,
|
||||
ConstTexts.rideDetails.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -96,8 +98,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Text(
|
||||
"${'Order Id:'.tr} ${Constant.orderId(orderId: controller.cabOrder.value.id.toString())}"
|
||||
.tr,
|
||||
"${ConstTexts.orderId.tr()} ${Constant.orderId(orderId: controller.cabOrder.value.id.toString())}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -130,8 +131,8 @@ class CabOrderDetails extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${'Booking Date:'.tr} ${controller.formatDate(controller.cabOrder.value.scheduleDateTime!)}"
|
||||
.tr,
|
||||
"${ConstTexts.bookingData.tr()} ${controller.formatDate(controller.cabOrder.value.scheduleDateTime!)}",
|
||||
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -435,7 +436,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Ride & Fare Summary".tr,
|
||||
ConstTexts.rideAndFareSummary.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -535,13 +536,11 @@ class CabOrderDetails extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
RoundedButtonBorder(
|
||||
title:
|
||||
controller
|
||||
title: controller
|
||||
.driverUser
|
||||
.value
|
||||
.averageRating
|
||||
.toStringAsFixed(1) ??
|
||||
'',
|
||||
.toStringAsFixed(1),
|
||||
width: 20,
|
||||
height: 3.5,
|
||||
radius: 10,
|
||||
@@ -589,8 +588,11 @@ class CabOrderDetails extends StatelessWidget {
|
||||
.value
|
||||
.id!
|
||||
.isNotEmpty
|
||||
? 'Update Review'.tr
|
||||
: 'Add Review'.tr,
|
||||
? ConstTexts
|
||||
.updateReview
|
||||
.tr()
|
||||
: ConstTexts.addReview
|
||||
.tr(),
|
||||
onPress: () async {
|
||||
final result = await Get.to(
|
||||
() => CabReviewScreen(),
|
||||
@@ -640,7 +642,8 @@ class CabOrderDetails extends StatelessWidget {
|
||||
),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: 'Complain'.tr,
|
||||
title:
|
||||
ConstTexts.complain.tr(),
|
||||
onPress: () async {
|
||||
Get.to(
|
||||
() => ComplainScreen(),
|
||||
@@ -718,7 +721,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr,
|
||||
ConstTexts.pleaseWait.tr(),
|
||||
);
|
||||
|
||||
UserModel? customer =
|
||||
@@ -825,14 +828,14 @@ class CabOrderDetails extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
_iconTile(
|
||||
"${double.parse(controller.cabOrder.value.distance.toString()).toStringAsFixed(2)} ${'KM'.tr}",
|
||||
"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 ?? '--',
|
||||
"Duration".tr,
|
||||
ConstTexts.duration.tr(),
|
||||
"assets/icons/ic_duration.svg",
|
||||
isDark,
|
||||
),
|
||||
@@ -867,7 +870,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Order Summary".tr,
|
||||
ConstTexts.orderSummary.tr(),
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.grey500,
|
||||
@@ -877,7 +880,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
|
||||
// Subtotal
|
||||
_summaryTile(
|
||||
"Subtotal",
|
||||
ConstTexts.subtotal.tr(),
|
||||
Constant.amountShow(
|
||||
amount: controller.subTotal.value.toString(),
|
||||
),
|
||||
@@ -886,7 +889,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
|
||||
// Discount
|
||||
_summaryTile(
|
||||
"Discount",
|
||||
ConstTexts.discount.tr(),
|
||||
Constant.amountShow(
|
||||
amount: controller.discount.value.toString(),
|
||||
),
|
||||
@@ -936,7 +939,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
|
||||
// Total
|
||||
_summaryTile(
|
||||
"Order Total",
|
||||
ConstTexts.orderTotal.tr(),
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
controller.totalAmount.value.toString(),
|
||||
@@ -992,7 +995,7 @@ class CabOrderDetails extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title.tr,
|
||||
title,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.greyDark800 : AppThemeData.grey800,
|
||||
|
||||
Reference in New Issue
Block a user