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