BASE: Initialize Localization.
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:customer/screen_ui/on_demand_service/on_demand_details_screen.da
|
||||
import 'package:customer/service/fire_store_utils.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -32,7 +33,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 10),
|
||||
Text("Favourite Services".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey900 : AppThemeData.grey900, fontSize: 20)),
|
||||
Text("Favourite Services".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey900 : AppThemeData.grey900, fontSize: 20)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -49,16 +50,16 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
children: [
|
||||
Image.asset("assets/images/login.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text("Please Log In to Continue".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
Text("Please Log In to Continue".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"You’re not logged in. Please sign in to access your account and explore all features.".tr,
|
||||
"You’re not logged in. Please sign in to access your account and explore all features.".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Log in".tr,
|
||||
title: "Log in".tr(),
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -74,7 +75,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child:
|
||||
controller.lstFav.isEmpty
|
||||
? Constant.showEmptyView(message: "Favourite Service not found.".tr)
|
||||
? Constant.showEmptyView(message: "Favourite Service not found.".tr())
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -271,19 +272,19 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
Widget _buildPrice(ProviderServiceModel provider, {bool isDark = false}) {
|
||||
if (provider.disPrice == "" || provider.disPrice == "0") {
|
||||
return Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
);
|
||||
} else {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
style: const TextStyle(fontSize: 12, color: Colors.grey, decoration: TextDecoration.lineThrough),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
@@ -29,7 +30,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
automaticallyImplyLeading: false,
|
||||
backgroundColor: AppThemeData.primary300,
|
||||
centerTitle: false,
|
||||
title: Padding(padding: const EdgeInsets.only(bottom: 10), child: Text("Booking History".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))),
|
||||
title: Padding(padding: const EdgeInsets.only(bottom: 10), child: Text("Booking History".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900))),
|
||||
bottom: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(48),
|
||||
child: TabBar(
|
||||
@@ -54,7 +55,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
final orders = controller.getOrdersForTab(title);
|
||||
|
||||
if (orders.isEmpty) {
|
||||
return Center(child: Text("No ride found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
|
||||
return Center(child: Text("No ride found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)));
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
@@ -124,7 +125,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
onProviderOrder.otp != null &&
|
||||
onProviderOrder.otp!.isNotEmpty)
|
||||
Text(
|
||||
"${'OTP :'.tr} ${onProviderOrder.otp}",
|
||||
"${'OTP :'.tr()} ${onProviderOrder.otp}",
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
],
|
||||
@@ -155,7 +156,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
final price = hasDiscount ? order.provider.disPrice.toString() : order.provider.price.toString();
|
||||
|
||||
return Text(
|
||||
order.provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: price) : "${Constant.amountShow(amount: price)}/${'hr'.tr}",
|
||||
order.provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: price) : "${Constant.amountShow(amount: price)}/${'hr'.tr()}",
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 16, color: AppThemeData.primary300),
|
||||
);
|
||||
}
|
||||
@@ -194,8 +195,8 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(label.tr, style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(value.tr, style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(label.tr(), style: AppThemeData.mediumTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(value.tr(), style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:bottom_picker/bottom_picker.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
@@ -46,7 +47,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text("Book Service".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text("Book Service".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -57,7 +58,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Services Section
|
||||
Text("Services".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text("Services".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
const SizedBox(height: 10),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
@@ -118,7 +119,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Address".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text("Address".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
SizedBox(height: 5),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
@@ -130,14 +131,14 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
controller.selectedAddress.value = shippingAddress;
|
||||
controller.calculatePrice();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Service not available in this area".tr);
|
||||
ShowToastDialog.showToast("Service not available in this area".tr());
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
ShippingAddress shippingAddress = ShippingAddress();
|
||||
|
||||
@@ -205,7 +206,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(title: "Description".tr, hintText: "Enter Description".tr, controller: controller.descriptionController.value, maxLine: 5),
|
||||
TextFieldWidget(title: "Description".tr(), hintText: "Enter Description".tr(), controller: controller.descriptionController.value, maxLine: 5),
|
||||
const SizedBox(height: 10),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
@@ -225,7 +226,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
closeIconColor: isDark ? Colors.white : Colors.black,
|
||||
).show(context);
|
||||
},
|
||||
child: TextFieldWidget(title: "Booking Date & Slot".tr, hintText: "Choose Date and Time".tr, controller: controller.dateTimeController.value, enable: false),
|
||||
child: TextFieldWidget(title: "Booking Date & Slot".tr(), hintText: "Choose Date and Time".tr(), controller: controller.dateTimeController.value, enable: false),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
controller.provider.value?.priceUnit == "Fixed"
|
||||
@@ -248,7 +249,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
buildPromoCode(controller, isDark),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
priceTotalRow(controller, isDark),
|
||||
],
|
||||
@@ -259,7 +260,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
bottomNavigationBar: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: RoundedButtonFill(title: "Confirm".tr, color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.confirmBooking(context)),
|
||||
child: RoundedButtonFill(title: "Confirm".tr(), color: AppThemeData.primary300, textColor: AppThemeData.grey50, onPress: () => controller.confirmBooking(context)),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -288,7 +289,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 3),
|
||||
child: Text(
|
||||
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}" : "${coupon.discount} ${'% Off'.tr}",
|
||||
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}" : "${coupon.discount} ${'% Off'.tr()}",
|
||||
style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 0.7, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
),
|
||||
@@ -301,7 +302,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Text(coupon.code ?? '', style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, letterSpacing: 0.5, color: Colors.orange)),
|
||||
Container(margin: const EdgeInsets.only(left: 15, right: 15, top: 3), width: 1, color: AppThemeData.grey50),
|
||||
Text(
|
||||
"valid till ".tr + controller.getDate(coupon.expiresAt!.toDate().toString()),
|
||||
"valid till ".tr() + controller.getDate(coupon.expiresAt!.toDate().toString()),
|
||||
style: TextStyle(letterSpacing: 0.5, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
],
|
||||
@@ -337,10 +338,10 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Promo Code".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
|
||||
Text("Promo Code".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Apply promo code".tr,
|
||||
"Apply promo code".tr(),
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -402,12 +403,12 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Container(padding: const EdgeInsets.only(top: 30), child: const Image(image: AssetImage('assets/images/redeem_coupon.png'), width: 100)),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: Text('Redeem Your Coupons'.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
|
||||
child: Text('Redeem Your Coupons'.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(top: 10, left: 22, right: 22),
|
||||
child: Text("Voucher or Coupon code".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("Voucher or Coupon code".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@@ -426,7 +427,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
controller: controller.couponTextController.value,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Write Coupon Code".tr,
|
||||
hintText: "Write Coupon Code".tr(),
|
||||
hintStyle: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400),
|
||||
),
|
||||
),
|
||||
@@ -437,7 +438,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 30, bottom: 30, left: 15, right: 15),
|
||||
child: RoundedButtonFill(
|
||||
title: "REDEEM NOW".tr,
|
||||
title: "REDEEM NOW".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -449,7 +450,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
controller.applyCoupon(matchingCoupon);
|
||||
Get.back();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Applied coupon not valid.".tr);
|
||||
ShowToastDialog.showToast("Applied coupon not valid.".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -475,7 +476,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 5),
|
||||
rowText("Price".tr, Constant.amountShow(amount: controller.price.value.toString()), isDark),
|
||||
rowText("Price".tr(), Constant.amountShow(amount: controller.price.value.toString()), isDark),
|
||||
controller.discountAmount.value != 0 ? const Divider() : const SizedBox(),
|
||||
controller.discountAmount.value != 0
|
||||
? Padding(
|
||||
@@ -488,7 +489,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${"Discount".tr} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
|
||||
"${"Discount".tr()} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
|
||||
style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
Text(controller.offerCode.value, style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
@@ -501,7 +502,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
)
|
||||
: const SizedBox(),
|
||||
const Divider(),
|
||||
rowText("SubTotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
|
||||
rowText("SubTotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
|
||||
const Divider(),
|
||||
ListView.builder(
|
||||
itemCount: Constant.taxList.length,
|
||||
@@ -534,7 +535,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
rowText("Total Amount".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
|
||||
rowText("Total Amount".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
),
|
||||
@@ -548,8 +549,8 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(title.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(value.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(title.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(value.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:customer/screen_ui/on_demand_service/view_category_service_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
@@ -41,9 +42,9 @@ class OnDemandCategoryScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Explore services".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text("Explore services".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text(
|
||||
"Explore services tailored for you—quick, easy, and personalized.".tr,
|
||||
"Explore services tailored for you—quick, easy, and personalized.".tr(),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 14, color: AppThemeData.grey900),
|
||||
@@ -64,7 +65,7 @@ class OnDemandCategoryScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
controller.categories.isEmpty
|
||||
? Center(child: Text("No Categories".tr))
|
||||
? Center(child: Text("No Categories".tr()))
|
||||
: GridView.builder(
|
||||
padding: const EdgeInsets.all(5),
|
||||
itemCount: controller.categories.length,
|
||||
|
||||
@@ -2,6 +2,7 @@ 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';
|
||||
@@ -41,18 +42,18 @@ class OnDemandDashboardScreen extends StatelessWidget {
|
||||
items:
|
||||
Constant.walletSetting == false
|
||||
? [
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
|
||||
]
|
||||
: [
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home_cab.svg", label: 'Home'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 1, assetIcon: "assets/icons/ic_fav.svg", label: 'Favourites'.tr(), controller: controller),
|
||||
|
||||
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 2, assetIcon: "assets/icons/ic_booking_cab.svg", label: 'My Bookings'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_wallet_cab.svg", label: 'Wallet'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/screen_ui/on_demand_service/provider_screen.dart';
|
||||
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';
|
||||
@@ -35,7 +36,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
RoundedButtonFill(
|
||||
title: "Book Now".tr,
|
||||
title: "Book Now".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
@@ -81,7 +82,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
child: Container(
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(40), color: controller.isOpen.value ? Colors.green : Colors.red),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(controller.isOpen.value ? "Open".tr : "Close".tr, style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontSize: 14)),
|
||||
child: Text(controller.isOpen.value ? "Open".tr() : "Close".tr(), style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.white, fontSize: 14)),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -111,19 +112,19 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
provider.disPrice == "" || provider.disPrice == "0"
|
||||
? Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
)
|
||||
: Row(
|
||||
children: [
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0),
|
||||
child: Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price ?? '0') : '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 18, color: Colors.grey, decoration: TextDecoration.lineThrough),
|
||||
),
|
||||
),
|
||||
@@ -153,7 +154,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"(${provider.reviewsCount} ${'Reviews'.tr})",
|
||||
"(${provider.reviewsCount} ${'Reviews'.tr()})",
|
||||
style: TextStyle(letterSpacing: 0.5, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500, color: isDark ? Colors.white : Colors.black),
|
||||
),
|
||||
],
|
||||
@@ -190,7 +191,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
builder: (context) => showTiming(context, controller, isDark),
|
||||
);
|
||||
},
|
||||
child: Text("View Timing".tr, style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.green, letterSpacing: 0.5)),
|
||||
child: Text("View Timing".tr(), style: const TextStyle(fontWeight: FontWeight.bold, color: Colors.green, letterSpacing: 0.5)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -253,7 +254,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(right: 10),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(color: controller.tabString.value == title ? AppThemeData.primary300 : Colors.grey.shade200, borderRadius: BorderRadius.circular(10)),
|
||||
child: Text(title.tr, style: TextStyle(fontWeight: FontWeight.bold, color: controller.tabString.value == title ? Colors.white : Colors.black)),
|
||||
child: Text(title.tr(), style: TextStyle(fontWeight: FontWeight.bold, color: controller.tabString.value == title ? Colors.white : Colors.black)),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -264,7 +265,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text((providerModel.description ?? '').tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
Text((providerModel.description ?? '').tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
const SizedBox(height: 10),
|
||||
Obx(() {
|
||||
final user = controller.userModel.value;
|
||||
@@ -339,7 +340,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
final photos = controller.provider.photos;
|
||||
|
||||
if (photos.isEmpty) {
|
||||
return Center(child: Text("No Image Found".tr));
|
||||
return Center(child: Text("No Image Found".tr()));
|
||||
}
|
||||
|
||||
return GridView.builder(
|
||||
@@ -373,7 +374,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
final reviews = controller.ratingService;
|
||||
|
||||
if (reviews.isEmpty) {
|
||||
return SizedBox(height: 200, child: Center(child: Text("No review Found".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))));
|
||||
return SizedBox(height: 200, child: Center(child: Text("No review Found".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900))));
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
@@ -439,21 +440,21 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Text("Service Timing".tr, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
|
||||
child: Text("Service Timing".tr(), style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: _timeCard(context, "Start Time : ".tr, provider.startTime.toString(), isDark)),
|
||||
Expanded(child: _timeCard(context, "Start Time : ".tr(), provider.startTime.toString(), isDark)),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: _timeCard(context, "End Time : ".tr, provider.endTime.toString(), isDark)),
|
||||
Expanded(child: _timeCard(context, "End Time : ".tr(), provider.endTime.toString(), isDark)),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Text("Service Days".tr, style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
|
||||
child: Text("Service Days".tr(), style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, fontFamily: AppThemeData.regular, color: AppThemeData.primary300)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
|
||||
@@ -15,6 +15,7 @@ import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/osm_map/map_picker_page.dart';
|
||||
import 'package:customer/widget/place_picker/location_picker_screen.dart';
|
||||
import 'package:customer/widget/place_picker/selected_location_model.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
@@ -60,7 +61,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Constant.userModel == null
|
||||
? InkWell(onTap: () => Get.offAll(const LoginScreen()), child: Text("Login".tr, style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)))
|
||||
? InkWell(onTap: () => Get.offAll(const LoginScreen()), child: Text("Login".tr(), style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)))
|
||||
: Text(Constant.userModel!.fullName(), style: AppThemeData.boldTextStyle(color: AppThemeData.grey900, fontSize: 12)),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
@@ -75,7 +76,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
} else {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
// ✅ declare it once here!
|
||||
ShippingAddress shippingAddress = ShippingAddress();
|
||||
@@ -165,16 +166,16 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Image.asset("assets/images/location.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text("No Store Found in Your Area".tr, style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
Text("No Store Found in Your Area".tr(), style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr,
|
||||
"Currently, there are no available store in your zone. Try changing your location to find nearby options.".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.bold),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Change Zone".tr,
|
||||
title: "Change Zone".tr(),
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -203,7 +204,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
),
|
||||
child:
|
||||
controller.categories.isEmpty
|
||||
? Constant.showEmptyView(message: "No Categories".tr)
|
||||
? Constant.showEmptyView(message: "No Categories".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Row(
|
||||
@@ -240,7 +241,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
width: 70,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View All".tr,
|
||||
"View All".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: AppThemeData.semiBoldTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
@@ -260,7 +261,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Most Popular services".tr,
|
||||
"Most Popular services".tr(),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontSize: 18, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600),
|
||||
),
|
||||
),
|
||||
@@ -268,13 +269,13 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
onTap: () {
|
||||
Get.to(() => ViewAllPopularServiceScreen());
|
||||
},
|
||||
child: Text("View all".tr, style: TextStyle(color: AppThemeData.primary300, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600)),
|
||||
child: Text("View all".tr(), style: TextStyle(color: AppThemeData.primary300, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w600)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
controller.providerList.isEmpty
|
||||
? Center(child: Text("No Services Found".tr))
|
||||
? Center(child: Text("No Services Found".tr()))
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -492,14 +493,14 @@ class ServiceView extends StatelessWidget {
|
||||
Widget _buildPrice() {
|
||||
if (provider.disPrice == "" || provider.disPrice == "0") {
|
||||
return Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.price) : '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
);
|
||||
} else {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
|
||||
provider.priceUnit == 'Fixed' ? Constant.amountShow(amount: provider.disPrice ?? '0') : '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
|
||||
style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold, color: isDark ? Colors.white : AppThemeData.primary300),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:clipboard/clipboard.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';
|
||||
import 'package:intl/intl.dart';
|
||||
@@ -42,7 +43,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text("Order Details".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text("Order Details".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -68,7 +69,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text('Cancel Reason'.tr, style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text('Cancel Reason'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(controller.onProviderOrder.value?.reason ?? '', style: AppThemeData.mediumTextStyle(fontSize: 14, color: AppThemeData.danger300)),
|
||||
],
|
||||
),
|
||||
@@ -89,13 +90,13 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('Booking ID'.tr, style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text('Booking ID'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
FlutterClipboard.copy(controller.onProviderOrder.value?.id ?? '').then((value) {
|
||||
SnackBar snackBar = SnackBar(
|
||||
content: Text(
|
||||
"Booking ID Copied".tr,
|
||||
"Booking ID Copied".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -110,7 +111,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
"${'Booking Address :'.tr} ${controller.onProviderOrder.value?.address?.getFullAddress()}",
|
||||
"${'Booking Address :'.tr()} ${controller.onProviderOrder.value?.address?.getFullAddress()}",
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
],
|
||||
@@ -159,7 +160,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 6),
|
||||
child: Text('${'Date:'.tr} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text('${'Date:'.tr()} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 6),
|
||||
@@ -176,7 +177,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 6),
|
||||
child: Text('${'Time:'.tr} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text('${'Time:'.tr()} ', style: AppThemeData.regularTextStyle(fontSize: 14, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 6),
|
||||
@@ -205,7 +206,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text('About Worker'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text('About Worker'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
@@ -302,7 +303,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
},
|
||||
|
||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.orange, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||
child: Text('Add Review'.tr, style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text('Add Review'.tr(), style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -327,7 +328,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Icon(Icons.call, color: AppThemeData.grey50),
|
||||
SizedBox(width: 10),
|
||||
Text('Call'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
Text('Call'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -336,7 +337,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ShowToastDialog.closeLoader();
|
||||
|
||||
Get.to(
|
||||
@@ -361,7 +362,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Icon(Icons.chat_bubble, color: AppThemeData.grey50),
|
||||
SizedBox(width: 10),
|
||||
Text('Chat'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
Text('Chat'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -379,7 +380,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
: SizedBox(),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text("About provider".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("About provider".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
@@ -458,7 +459,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.orange, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||
child: Text('Add Review'.tr, style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text('Add Review'.tr(), style: AppThemeData.regularTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -483,7 +484,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Icon(Icons.call, color: AppThemeData.grey50),
|
||||
SizedBox(width: 10),
|
||||
Text('Call'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
Text('Call'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -498,7 +499,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
ShowToastDialog.closeLoader();
|
||||
|
||||
@@ -524,7 +525,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Icon(Icons.chat_bubble, color: AppThemeData.grey50),
|
||||
SizedBox(width: 10),
|
||||
Text('Chat'.tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
Text('Chat'.tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: AppThemeData.grey50)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -544,7 +545,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
priceTotalRow(controller, isDark),
|
||||
],
|
||||
@@ -574,7 +575,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
: Offstage(),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Text("Price Detail".tr, style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("Price Detail".tr(), style: AppThemeData.semiBoldTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
priceTotalRow(controller, isDark),
|
||||
],
|
||||
@@ -594,7 +595,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text("Total Extra Charges : ".tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
Text("Total Extra Charges : ".tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
Text(
|
||||
Constant.amountShow(amount: controller.onProviderOrder.value?.extraCharges.toString()),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
|
||||
@@ -607,7 +608,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Extra charge Notes : ".tr,
|
||||
"Extra charge Notes : ".tr(),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -640,7 +641,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
controller.onProviderOrder.value?.newScheduleDateTime != null
|
||||
? Row(
|
||||
children: [
|
||||
Text("New Date : ".tr, style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
Text("New Date : ".tr(), style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500)),
|
||||
Text(
|
||||
DateFormat('dd-MMM-yyyy hh:mm a').format(controller.onProviderOrder.value!.newScheduleDateTime!.toDate()),
|
||||
style: TextStyle(color: isDark ? Colors.white : Colors.black, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
|
||||
@@ -652,7 +653,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: RoundedButtonFill(
|
||||
title: "Cancel Booking".tr,
|
||||
title: "Cancel Booking".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -672,7 +673,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
? Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: RoundedButtonFill(
|
||||
title: 'Pay Extra Amount'.tr,
|
||||
title: 'Pay Extra Amount'.tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
@@ -689,7 +690,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: RoundedButtonFill(
|
||||
title: 'Pay Now'.tr,
|
||||
title: 'Pay Now'.tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
@@ -738,7 +739,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 3),
|
||||
child: Text(
|
||||
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}" : "${coupon.discount} ${'% Off'.tr}",
|
||||
coupon.discountType == "Fix Price" ? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}" : "${coupon.discount} ${'% Off'.tr()}",
|
||||
style: TextStyle(fontWeight: FontWeight.bold, letterSpacing: 0.7, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
),
|
||||
@@ -751,7 +752,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Text(coupon.code ?? '', style: const TextStyle(fontSize: 16, fontWeight: FontWeight.normal, letterSpacing: 0.5, color: Colors.orange)),
|
||||
Container(margin: const EdgeInsets.only(left: 15, right: 15, top: 3), width: 1, color: AppThemeData.grey50),
|
||||
Text(
|
||||
"valid till ".tr + controller.getDate(coupon.expiresAt!.toDate().toString()),
|
||||
"valid till ".tr() + controller.getDate(coupon.expiresAt!.toDate().toString()),
|
||||
style: TextStyle(letterSpacing: 0.5, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
],
|
||||
@@ -787,10 +788,10 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Promo Code".tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
|
||||
Text("Promo Code".tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900), overflow: TextOverflow.ellipsis),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Apply promo code".tr,
|
||||
"Apply promo code".tr(),
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -846,12 +847,12 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Container(padding: const EdgeInsets.only(top: 30), child: const Image(image: AssetImage('assets/images/redeem_coupon.png'), width: 100)),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: Text('Redeem Your Coupons'.tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
|
||||
child: Text('Redeem Your Coupons'.tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900, fontSize: 16)),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(top: 10, left: 22, right: 22),
|
||||
child: Text("Voucher or Coupon code".tr, style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
child: Text("Voucher or Coupon code".tr(), style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
@@ -870,7 +871,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
controller: controller.couponTextController.value,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
hintText: "Write Coupon Code".tr,
|
||||
hintText: "Write Coupon Code".tr(),
|
||||
hintStyle: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.greyDark400 : AppThemeData.grey400),
|
||||
),
|
||||
),
|
||||
@@ -881,7 +882,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 30, bottom: 30, left: 15, right: 15),
|
||||
child: RoundedButtonFill(
|
||||
title: "REDEEM NOW".tr,
|
||||
title: "REDEEM NOW".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -899,7 +900,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
});
|
||||
} else {
|
||||
print("❌ No matching coupon found");
|
||||
ShowToastDialog.showToast("Applied coupon not valid.".tr);
|
||||
ShowToastDialog.showToast("Applied coupon not valid.".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -926,7 +927,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 5),
|
||||
rowText(
|
||||
"Price".tr,
|
||||
"Price".tr(),
|
||||
//Constant.amountShow(amount: controller.price.value.toString()),
|
||||
controller.onProviderOrder.value?.provider.disPrice == "" || controller.onProviderOrder.value?.provider.disPrice == "0"
|
||||
? "${Constant.amountShow(amount: controller.onProviderOrder.value?.provider.price.toString())} × ${controller.onProviderOrder.value?.quantity.toStringAsFixed(2)} ${Constant.amountShow(amount: controller.price.value.toString())}"
|
||||
@@ -945,7 +946,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${"Discount".tr} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
|
||||
"${"Discount".tr()} ${controller.discountType.value == 'Percentage' || controller.discountType.value == 'Percent' ? "(${controller.discountLabel.value}%)" : "(${Constant.amountShow(amount: controller.discountLabel.value)})"}",
|
||||
style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
),
|
||||
Text(controller.offerCode.value, style: TextStyle(color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
@@ -958,7 +959,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
)
|
||||
: const SizedBox(),
|
||||
const Divider(),
|
||||
rowText("SubTotal".tr, Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
|
||||
rowText("SubTotal".tr(), Constant.amountShow(amount: controller.subTotal.value.toString()), isDark),
|
||||
const Divider(),
|
||||
ListView.builder(
|
||||
itemCount: Constant.taxList.length,
|
||||
@@ -992,7 +993,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
// Total Amount
|
||||
rowText("Total Amount".tr, Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
|
||||
rowText("Total Amount".tr(), Constant.amountShow(amount: controller.totalAmount.value.toString()), isDark),
|
||||
const SizedBox(height: 5),
|
||||
],
|
||||
),
|
||||
@@ -1017,23 +1018,23 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
return Get.dialog(
|
||||
AlertDialog(
|
||||
backgroundColor: isDark ? AppThemeData.greyDark50 : AppThemeData.grey50,
|
||||
title: Text('Please give reason for canceling this Booking'.tr, style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
title: Text('Please give reason for canceling this Booking'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 16, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
content: TextFormField(
|
||||
controller: controller.cancelBookingController.value,
|
||||
maxLines: 5,
|
||||
decoration: InputDecoration(hintText: "Specify your reason here".tr, border: OutlineInputBorder(borderRadius: BorderRadius.circular(7))),
|
||||
decoration: InputDecoration(hintText: "Specify your reason here".tr(), border: OutlineInputBorder(borderRadius: BorderRadius.circular(7))),
|
||||
),
|
||||
actions: [
|
||||
TextButton(onPressed: () => Get.back(), child: Text('Cancel'.tr, style: TextStyle(color: Colors.red))),
|
||||
TextButton(onPressed: () => Get.back(), child: Text('Cancel'.tr(), style: TextStyle(color: Colors.red))),
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (controller.cancelBookingController.value.text.trim().isEmpty) {
|
||||
ShowToastDialog.showToast("Please enter reason".tr);
|
||||
ShowToastDialog.showToast("Please enter reason".tr());
|
||||
} else {
|
||||
await controller.cancelBooking();
|
||||
}
|
||||
},
|
||||
child: Text('Continue'.tr, style: TextStyle(color: Colors.green)),
|
||||
child: Text('Continue'.tr(), style: TextStyle(color: Colors.green)),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/0n_demand_payment_controller.dart';
|
||||
@@ -39,7 +40,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text("Select Payment Method".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text("Select Payment Method".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -54,7 +55,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Preferred Payment".tr, textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
Text("Preferred Payment".tr(), textAlign: TextAlign.start, style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500)),
|
||||
const SizedBox(height: 10),
|
||||
if (controller.walletSettingModel.value.isEnabled == true || controller.cashOnDeliverySettingModel.value.isEnabled == true)
|
||||
Container(
|
||||
@@ -84,7 +85,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Other Payment Options".tr,
|
||||
"Other Payment Options".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.boldTextStyle(fontSize: 15, color: isDark ? AppThemeData.greyDark500 : AppThemeData.grey500),
|
||||
),
|
||||
@@ -132,7 +133,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr,
|
||||
title: "Continue".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
@@ -156,9 +157,9 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
double walletAmount = double.tryParse(Constant.userModel?.walletAmount?.toString() ?? "0") ?? 0;
|
||||
|
||||
if (walletAmount == 0) {
|
||||
ShowToastDialog.showToast("Wallet balance is 0. Please recharge wallet.".tr);
|
||||
ShowToastDialog.showToast("Wallet balance is 0. Please recharge wallet.".tr());
|
||||
} else if (walletAmount < totalAmount) {
|
||||
ShowToastDialog.showToast("Insufficient wallet balance. Please add funds.".tr);
|
||||
ShowToastDialog.showToast("Insufficient wallet balance. Please add funds.".tr());
|
||||
} else {
|
||||
controller.placeOrder();
|
||||
}
|
||||
@@ -176,7 +177,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
RazorPayController().createOrderRazorPay(amount: double.parse("${controller.totalAmount.value}"), razorpayModel: controller.razorPayModel.value).then((value) {
|
||||
if (value == null) {
|
||||
Get.back();
|
||||
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr);
|
||||
ShowToastDialog.showToast("Something went wrong, please contact admin.".tr());
|
||||
} else {
|
||||
CreateRazorPayOrderModel result = value;
|
||||
controller.openCheckout(amount: "${controller.totalAmount.value}", orderId: result.id);
|
||||
@@ -184,7 +185,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
});
|
||||
} else {
|
||||
controller.isOrderPlaced.value = false;
|
||||
ShowToastDialog.showToast("Please select payment method".tr);
|
||||
ShowToastDialog.showToast("Please select payment method".tr());
|
||||
}
|
||||
controller.isOrderPlaced.value = false;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
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';
|
||||
@@ -38,7 +39,7 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text(controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -62,7 +63,7 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(top: 65),
|
||||
child: Column(
|
||||
children: [
|
||||
Text('Rate for'.tr, style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text('Rate for'.tr(), style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900)),
|
||||
Text(
|
||||
controller.reviewFor.value == "Provider" ? controller.order.value!.provider.authorName ?? "" : controller.workerModel.value!.fullName(),
|
||||
style: AppThemeData.mediumTextStyle(fontSize: 18, color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900),
|
||||
@@ -83,11 +84,11 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
),
|
||||
Padding(padding: EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr, controller: controller.comment, maxLine: 5)),
|
||||
Padding(padding: EdgeInsets.all(20.0), child: TextFieldWidget(hintText: "Type comment....".tr(), controller: controller.comment, maxLine: 5)),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: RoundedButtonFill(
|
||||
title: controller.ratingModel.value != null ? "Update Review".tr : "Add Review".tr,
|
||||
title: controller.ratingModel.value != null ? "Update Review".tr() : "Add Review".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: controller.submitReview,
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -27,7 +28,7 @@ class ProviderInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Provider Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Provider Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body: FirestorePagination(
|
||||
//item builder type is compulsory.
|
||||
@@ -37,7 +38,7 @@ class ProviderInboxScreen extends StatelessWidget {
|
||||
InboxModel inboxModel = InboxModel.fromJson(data!);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
|
||||
@@ -113,7 +114,7 @@ class ProviderInboxScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
|
||||
// orderBy is compulsory to enable pagination
|
||||
query: FirebaseFirestore.instance.collection('chat_provider').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/screen_ui/on_demand_service/on_demand_home_screen.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';
|
||||
@@ -86,7 +87,7 @@ class ProviderScreen extends StatelessWidget {
|
||||
const Divider(),
|
||||
const SizedBox(height: 10),
|
||||
controller.providerList.isEmpty
|
||||
? Center(child: Text("No Services Found".tr))
|
||||
? Center(child: Text("No Services Found".tr()))
|
||||
: Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: controller.providerList.length,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:customer/screen_ui/on_demand_service/on_demand_home_screen.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
@@ -36,7 +37,7 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text("All Services".tr, style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
Text("All Services".tr(), style: AppThemeData.boldTextStyle(fontSize: 18, color: AppThemeData.grey900)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -48,10 +49,10 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 15),
|
||||
child: Column(
|
||||
children: [
|
||||
TextFieldWidget(hintText: "Search Service".tr, controller: controller.searchTextFiledController.value, onchange: (value) => controller.getFilterData(value.toString())),
|
||||
TextFieldWidget(hintText: "Search Service".tr(), controller: controller.searchTextFiledController.value, onchange: (value) => controller.getFilterData(value.toString())),
|
||||
const SizedBox(height: 15),
|
||||
controller.providerList.isEmpty
|
||||
? Expanded(child: Center(child: Constant.showEmptyView(message: "No service Found".tr)))
|
||||
? Expanded(child: Center(child: Constant.showEmptyView(message: "No service Found".tr())))
|
||||
: Expanded(
|
||||
child: ListView.builder(
|
||||
itemCount: controller.providerList.length,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
@@ -45,7 +46,7 @@ class ViewCategoryServiceListScreen extends StatelessWidget {
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.providerList.isEmpty
|
||||
? Constant.showEmptyView(message: "No Service Found".tr)
|
||||
? Constant.showEmptyView(message: "No Service Found".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: ListView.builder(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/fireStore_pagination.dart';
|
||||
import 'package:customer/widget/firebase_pagination/src/models/view_type.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -27,7 +28,7 @@ class WorkerInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Worker Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Worker Inbox".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body: FirestorePagination(
|
||||
//item builder type is compulsory.
|
||||
@@ -37,7 +38,7 @@ class WorkerInboxScreen extends StatelessWidget {
|
||||
InboxModel inboxModel = InboxModel.fromJson(data!);
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(inboxModel.customerId.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(inboxModel.restaurantId.toString());
|
||||
@@ -114,7 +115,7 @@ class WorkerInboxScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
shrinkWrap: true,
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr),
|
||||
onEmpty: Constant.showEmptyView(message: "No Conversion found".tr()),
|
||||
// orderBy is compulsory to enable pagination
|
||||
query: FirebaseFirestore.instance.collection('chat_worker').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
Reference in New Issue
Block a user