BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -9,9 +9,10 @@ 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:customer/utils/app_router.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class FavouriteOndemandScreen extends StatelessWidget {
|
||||
const FavouriteOndemandScreen({super.key});
|
||||
@@ -35,7 +36,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Favourite Services".tr(),
|
||||
"Favourite Services".tr,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color:
|
||||
@@ -60,7 +61,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
Image.asset("assets/images/login.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"Please Log In to Continue".tr(),
|
||||
"Please Log In to Continue".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -73,7 +74,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"You’re not logged in. Please sign in to access your account and explore all features."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -86,7 +87,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Log in".tr(),
|
||||
title: "Log in".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -106,7 +107,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.lstFav.isEmpty
|
||||
? Constant.showEmptyView(
|
||||
message: "Favourite Service not found.".tr(),
|
||||
message: "Favourite Service not found.".tr,
|
||||
)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
@@ -603,7 +604,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
return Text(
|
||||
provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: provider.price)
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -616,7 +617,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: provider.disPrice ?? '0')
|
||||
: '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -627,7 +628,7 @@ class FavouriteOndemandScreen extends StatelessWidget {
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: provider.price)
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
style: const TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.grey,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/my_booking_on_demand_controller.dart';
|
||||
@@ -35,7 +35,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10),
|
||||
child: Text(
|
||||
"Booking History".tr(),
|
||||
"Booking History".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -75,7 +75,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
if (orders.isEmpty) {
|
||||
return Center(
|
||||
child: Text(
|
||||
"No ride found".tr(),
|
||||
"No ride found".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -274,7 +274,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
.otp!
|
||||
.isNotEmpty)
|
||||
Text(
|
||||
"${'OTP :'.tr()} ${onProviderOrder.otp}",
|
||||
"${'OTP :'.tr} ${onProviderOrder.otp}",
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
@@ -324,7 +324,7 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
return Text(
|
||||
order.provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: price)
|
||||
: "${Constant.amountShow(amount: price)}/${'hr'.tr()}",
|
||||
: "${Constant.amountShow(amount: price)}/${'hr'.tr}",
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 16,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -402,14 +402,14 @@ class MyBookingOnDemandScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
label.tr(),
|
||||
label.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value.tr(),
|
||||
value.tr,
|
||||
style: AppThemeData.regularTextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
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';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../controllers/on_demand_booking_controller.dart';
|
||||
@@ -60,7 +60,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Book Service".tr(),
|
||||
"Book Service".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -77,7 +77,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
children: [
|
||||
// Services Section
|
||||
Text(
|
||||
"Services".tr(),
|
||||
"Services".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -209,7 +209,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Address".tr(),
|
||||
"Address".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -237,7 +237,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Service not available in this area"
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -246,7 +246,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
|
||||
ShippingAddress shippingAddress =
|
||||
@@ -362,8 +362,8 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
TextFieldWidget(
|
||||
title: "Description".tr(),
|
||||
hintText: "Enter Description".tr(),
|
||||
title: "Description".tr,
|
||||
hintText: "Enter Description".tr,
|
||||
controller: controller.descriptionController.value,
|
||||
maxLine: 5,
|
||||
),
|
||||
@@ -405,8 +405,8 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
).show(context);
|
||||
},
|
||||
child: TextFieldWidget(
|
||||
title: "Booking Date & Slot".tr(),
|
||||
hintText: "Choose Date and Time".tr(),
|
||||
title: "Booking Date & Slot".tr,
|
||||
hintText: "Choose Date and Time".tr,
|
||||
controller: controller.dateTimeController.value,
|
||||
enable: false,
|
||||
),
|
||||
@@ -440,7 +440,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
"Price Detail".tr(),
|
||||
"Price Detail".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -460,7 +460,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
bottomNavigationBar: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: RoundedButtonFill(
|
||||
title: "Confirm".tr(),
|
||||
title: "Confirm".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () => controller.confirmBooking(context),
|
||||
@@ -506,8 +506,8 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(top: 3),
|
||||
child: Text(
|
||||
coupon.discountType == "Fix Price"
|
||||
? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}"
|
||||
: "${coupon.discount} ${'% Off'.tr()}",
|
||||
? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}"
|
||||
: "${coupon.discount} ${'% Off'.tr}",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.7,
|
||||
@@ -543,7 +543,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
color: AppThemeData.grey50,
|
||||
),
|
||||
Text(
|
||||
"valid till ".tr() +
|
||||
"valid till ".tr +
|
||||
controller.getDate(
|
||||
coupon.expiresAt!.toDate().toString(),
|
||||
),
|
||||
@@ -595,7 +595,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Promo Code".tr(),
|
||||
"Promo Code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -607,7 +607,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Apply promo code".tr(),
|
||||
"Apply promo code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -701,7 +701,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: Text(
|
||||
'Redeem Your Coupons'.tr(),
|
||||
'Redeem Your Coupons'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -719,7 +719,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
right: 22,
|
||||
),
|
||||
child: Text(
|
||||
"Voucher or Coupon code".tr(),
|
||||
"Voucher or Coupon code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -763,7 +763,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
|
||||
@@ -784,7 +784,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
right: 15,
|
||||
),
|
||||
child: RoundedButtonFill(
|
||||
title: "REDEEM NOW".tr(),
|
||||
title: "REDEEM NOW".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -803,7 +803,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
Get.back();
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Applied coupon not valid.".tr(),
|
||||
"Applied coupon not valid.".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -833,7 +833,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 5),
|
||||
rowText(
|
||||
"Price".tr(),
|
||||
"Price".tr,
|
||||
Constant.amountShow(amount: controller.price.value.toString()),
|
||||
isDark,
|
||||
),
|
||||
@@ -851,7 +851,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
|
||||
@@ -881,7 +881,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
: const SizedBox(),
|
||||
const Divider(),
|
||||
rowText(
|
||||
"SubTotal".tr(),
|
||||
"SubTotal".tr,
|
||||
Constant.amountShow(amount: controller.subTotal.value.toString()),
|
||||
isDark,
|
||||
),
|
||||
@@ -938,7 +938,7 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
},
|
||||
),
|
||||
rowText(
|
||||
"Total Amount".tr(),
|
||||
"Total Amount".tr,
|
||||
Constant.amountShow(
|
||||
amount: controller.totalAmount.value.toString(),
|
||||
),
|
||||
@@ -958,13 +958,13 @@ class OnDemandBookingScreen extends StatelessWidget {
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
title.tr(),
|
||||
title.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value.tr(),
|
||||
value.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/on_demand_category_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -55,7 +55,7 @@ class OnDemandCategoryScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Explore services".tr(),
|
||||
"Explore services".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -63,7 +63,7 @@ class OnDemandCategoryScreen extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Explore services tailored for you—quick, easy, and personalized."
|
||||
.tr(),
|
||||
.tr,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
@@ -90,7 +90,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,10 +2,10 @@ import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/cab_dashboard_controller.dart';
|
||||
import 'package:customer/controllers/theme_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/on_demand_dashboard_controller.dart';
|
||||
|
||||
class OnDemandDashboardScreen extends StatelessWidget {
|
||||
@@ -52,28 +52,28 @@ class OnDemandDashboardScreen extends StatelessWidget {
|
||||
isDark,
|
||||
index: 0,
|
||||
assetIcon: "assets/icons/ic_home_cab.svg",
|
||||
label: 'Home'.tr(),
|
||||
label: 'Home'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 1,
|
||||
assetIcon: "assets/icons/ic_fav.svg",
|
||||
label: 'Favourites'.tr(),
|
||||
label: 'Favourites'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 2,
|
||||
assetIcon: "assets/icons/ic_booking_cab.svg",
|
||||
label: 'My Bookings'.tr(),
|
||||
label: 'My Bookings'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 3,
|
||||
assetIcon: "assets/icons/ic_profile.svg",
|
||||
label: 'Profile'.tr(),
|
||||
label: 'Profile'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
]
|
||||
@@ -82,14 +82,14 @@ class OnDemandDashboardScreen extends StatelessWidget {
|
||||
isDark,
|
||||
index: 0,
|
||||
assetIcon: "assets/icons/ic_home_cab.svg",
|
||||
label: 'Home'.tr(),
|
||||
label: 'Home'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 1,
|
||||
assetIcon: "assets/icons/ic_fav.svg",
|
||||
label: 'Favourites'.tr(),
|
||||
label: 'Favourites'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
|
||||
@@ -97,21 +97,21 @@ class OnDemandDashboardScreen extends StatelessWidget {
|
||||
isDark,
|
||||
index: 2,
|
||||
assetIcon: "assets/icons/ic_booking_cab.svg",
|
||||
label: 'My Bookings'.tr(),
|
||||
label: 'My Bookings'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 3,
|
||||
assetIcon: "assets/icons/ic_wallet_cab.svg",
|
||||
label: 'Wallet'.tr(),
|
||||
label: 'Wallet'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
navigationBarItem(
|
||||
isDark,
|
||||
index: 4,
|
||||
assetIcon: "assets/icons/ic_profile.svg",
|
||||
label: 'Profile'.tr(),
|
||||
label: 'Profile'.tr,
|
||||
controller: controller,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
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:customer/utils/app_router.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../models/provider_serivce_model.dart';
|
||||
@@ -42,7 +43,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 {
|
||||
@@ -132,7 +133,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
controller.isOpen.value ? "Open".tr() : "Close".tr(),
|
||||
controller.isOpen.value ? "Open".tr : "Close".tr,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.white,
|
||||
@@ -177,7 +178,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
? Constant.amountShow(
|
||||
amount: provider.price ?? '0',
|
||||
)
|
||||
: '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: AppThemeData.regular,
|
||||
@@ -195,7 +196,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
? Constant.amountShow(
|
||||
amount: provider.disPrice ?? '0',
|
||||
)
|
||||
: '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.disPrice ?? '0')}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: AppThemeData.regular,
|
||||
@@ -213,7 +214,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
? Constant.amountShow(
|
||||
amount: provider.price ?? '0',
|
||||
)
|
||||
: '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.price ?? '0')}/${'hr'.tr}',
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 18,
|
||||
@@ -271,7 +272,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,
|
||||
@@ -342,7 +343,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"View Timing".tr(),
|
||||
"View Timing".tr,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.green,
|
||||
@@ -451,7 +452,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Text(
|
||||
title.tr(),
|
||||
title.tr,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color:
|
||||
@@ -475,7 +476,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
(providerModel.description ?? '').tr(),
|
||||
(providerModel.description ?? '').tr,
|
||||
style: TextStyle(
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
fontSize: 14,
|
||||
@@ -620,7 +621,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(
|
||||
@@ -686,7 +687,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
height: 200,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"No review Found".tr(),
|
||||
"No review Found".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
),
|
||||
@@ -810,7 +811,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Text(
|
||||
"Service Timing".tr(),
|
||||
"Service Timing".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -826,7 +827,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: _timeCard(
|
||||
context,
|
||||
"Start Time : ".tr(),
|
||||
"Start Time : ".tr,
|
||||
provider.startTime.toString(),
|
||||
isDark,
|
||||
),
|
||||
@@ -835,7 +836,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: _timeCard(
|
||||
context,
|
||||
"End Time : ".tr(),
|
||||
"End Time : ".tr,
|
||||
provider.endTime.toString(),
|
||||
isDark,
|
||||
),
|
||||
@@ -846,7 +847,7 @@ class OnDemandDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
|
||||
child: Text(
|
||||
"Service Days".tr(),
|
||||
"Service Days".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -11,16 +11,17 @@ import 'package:customer/screen_ui/on_demand_service/view_category_service_scree
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/show_toast_dialog.dart';
|
||||
import 'package:customer/utils/app_router.dart';
|
||||
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';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/on_demand_home_controller.dart';
|
||||
import '../../models/category_model.dart';
|
||||
import '../../models/provider_serivce_model.dart';
|
||||
@@ -76,7 +77,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
? InkWell(
|
||||
onTap: () => Get.offAll(const LoginScreen()),
|
||||
child: Text(
|
||||
"Login".tr(),
|
||||
"Login".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
color: AppThemeData.grey900,
|
||||
fontSize: 12,
|
||||
@@ -104,7 +105,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
|
||||
// ✅ declare it once here!
|
||||
@@ -240,7 +241,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
Image.asset("assets/images/location.gif", height: 120),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"No Store Found in Your Area".tr(),
|
||||
"No Store Found in Your Area".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -253,7 +254,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Currently, there are no available store in your zone. Try changing your location to find nearby options."
|
||||
.tr(),
|
||||
.tr,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color:
|
||||
@@ -266,7 +267,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Change Zone".tr(),
|
||||
title: "Change Zone".tr,
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -308,7 +309,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.categories.isEmpty
|
||||
? Constant.showEmptyView(
|
||||
message: "No Categories".tr(),
|
||||
message: "No Categories".tr,
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@@ -388,7 +389,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
width: 70,
|
||||
child: Center(
|
||||
child: Text(
|
||||
"View All".tr(),
|
||||
"View All".tr,
|
||||
textAlign:
|
||||
TextAlign.center,
|
||||
maxLines: 1,
|
||||
@@ -416,7 +417,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,
|
||||
@@ -431,7 +432,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
Get.to(() => ViewAllPopularServiceScreen());
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr(),
|
||||
"View all".tr,
|
||||
style: TextStyle(
|
||||
color: AppThemeData.primary300,
|
||||
fontSize: 14,
|
||||
@@ -444,7 +445,7 @@ class OnDemandHomeScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
controller.providerList.isEmpty
|
||||
? Center(child: Text("No Services Found".tr()))
|
||||
? Center(child: Text("No Services Found".tr))
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -772,7 +773,7 @@ class ServiceView extends StatelessWidget {
|
||||
return Text(
|
||||
provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: provider.price)
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.price ?? "0")}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -785,7 +786,7 @@ class ServiceView extends StatelessWidget {
|
||||
Text(
|
||||
provider.priceUnit == 'Fixed'
|
||||
? Constant.amountShow(amount: provider.disPrice ?? '0')
|
||||
: '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr()}',
|
||||
: '${Constant.amountShow(amount: provider.disPrice)}/${'hr'.tr}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import '../../controllers/on_demand_order_details_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -56,7 +56,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Order Details".tr(),
|
||||
"Order Details".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -100,7 +100,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Cancel Reason'.tr(),
|
||||
'Cancel Reason'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -155,7 +155,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Booking ID'.tr(),
|
||||
'Booking ID'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -175,7 +175,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
).then((value) {
|
||||
SnackBar snackBar = SnackBar(
|
||||
content: Text(
|
||||
"Booking ID Copied".tr(),
|
||||
"Booking ID Copied".tr,
|
||||
textAlign: TextAlign.center,
|
||||
style:
|
||||
AppThemeData.mediumTextStyle(
|
||||
@@ -207,7 +207,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:
|
||||
@@ -296,7 +296,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
top: 6,
|
||||
),
|
||||
child: Text(
|
||||
'${'Date:'.tr()} ',
|
||||
'${'Date:'.tr} ',
|
||||
style:
|
||||
AppThemeData.regularTextStyle(
|
||||
fontSize: 14,
|
||||
@@ -350,7 +350,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
top: 6,
|
||||
),
|
||||
child: Text(
|
||||
'${'Time:'.tr()} ',
|
||||
'${'Time:'.tr} ',
|
||||
style:
|
||||
AppThemeData.regularTextStyle(
|
||||
fontSize: 14,
|
||||
@@ -422,7 +422,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
'About Worker'.tr(),
|
||||
'About Worker'.tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -674,7 +674,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'Add Review'.tr(),
|
||||
'Add Review'.tr,
|
||||
style:
|
||||
AppThemeData.regularTextStyle(
|
||||
fontSize: 16,
|
||||
@@ -754,7 +754,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
'Call'.tr(),
|
||||
'Call'.tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -771,7 +771,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
ShowToastDialog.closeLoader();
|
||||
|
||||
@@ -844,7 +844,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
'Chat'.tr(),
|
||||
'Chat'.tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -870,7 +870,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
"About provider".tr(),
|
||||
"About provider".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -1064,7 +1064,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'Add Review'.tr(),
|
||||
'Add Review'.tr,
|
||||
style: AppThemeData.regularTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -1130,7 +1130,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
'Call'.tr(),
|
||||
'Call'.tr,
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
@@ -1192,7 +1192,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
child: ElevatedButton(
|
||||
onPressed: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait...".tr(),
|
||||
"Please wait...".tr,
|
||||
);
|
||||
|
||||
ShowToastDialog.closeLoader();
|
||||
@@ -1260,7 +1260,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
'Chat'.tr(),
|
||||
'Chat'.tr,
|
||||
style:
|
||||
AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
@@ -1297,7 +1297,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10),
|
||||
child: Text(
|
||||
"Price Detail".tr(),
|
||||
"Price Detail".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -1362,7 +1362,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 16),
|
||||
child: Text(
|
||||
"Price Detail".tr(),
|
||||
"Price Detail".tr,
|
||||
style: AppThemeData.semiBoldTextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -1405,7 +1405,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"Total Extra Charges : ".tr(),
|
||||
"Total Extra Charges : ".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -1442,7 +1442,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Extra charge Notes : ".tr(),
|
||||
"Extra charge Notes : ".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -1518,7 +1518,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
? Row(
|
||||
children: [
|
||||
Text(
|
||||
"New Date : ".tr(),
|
||||
"New Date : ".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -1564,7 +1564,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: RoundedButtonFill(
|
||||
title: "Cancel Booking".tr(),
|
||||
title: "Cancel Booking".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -1590,7 +1590,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 {
|
||||
@@ -1633,7 +1633,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: RoundedButtonFill(
|
||||
title: 'Pay Now'.tr(),
|
||||
title: 'Pay Now'.tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
@@ -1728,8 +1728,8 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
margin: const EdgeInsets.only(top: 3),
|
||||
child: Text(
|
||||
coupon.discountType == "Fix Price"
|
||||
? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr()}"
|
||||
: "${coupon.discount} ${'% Off'.tr()}",
|
||||
? "${Constant.amountShow(amount: coupon.discount.toString())} ${'OFF'.tr}"
|
||||
: "${coupon.discount} ${'% Off'.tr}",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
letterSpacing: 0.7,
|
||||
@@ -1765,7 +1765,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
color: AppThemeData.grey50,
|
||||
),
|
||||
Text(
|
||||
"valid till ".tr() +
|
||||
"valid till ".tr +
|
||||
controller.getDate(
|
||||
coupon.expiresAt!.toDate().toString(),
|
||||
),
|
||||
@@ -1821,7 +1821,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Promo Code".tr(),
|
||||
"Promo Code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -1833,7 +1833,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Apply promo code".tr(),
|
||||
"Apply promo code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 15,
|
||||
color:
|
||||
@@ -1928,7 +1928,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.only(top: 20),
|
||||
child: Text(
|
||||
'Redeem Your Coupons'.tr(),
|
||||
'Redeem Your Coupons'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -1946,7 +1946,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
right: 22,
|
||||
),
|
||||
child: Text(
|
||||
"Voucher or Coupon code".tr(),
|
||||
"Voucher or Coupon code".tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -1990,7 +1990,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
|
||||
@@ -2011,7 +2011,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
right: 15,
|
||||
),
|
||||
child: RoundedButtonFill(
|
||||
title: "REDEEM NOW".tr(),
|
||||
title: "REDEEM NOW".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () {
|
||||
@@ -2043,7 +2043,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
} else {
|
||||
print("❌ No matching coupon found");
|
||||
ShowToastDialog.showToast(
|
||||
"Applied coupon not valid.".tr(),
|
||||
"Applied coupon not valid.".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
@@ -2073,7 +2073,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"
|
||||
@@ -2095,7 +2095,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
|
||||
@@ -2125,7 +2125,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
: const SizedBox(),
|
||||
const Divider(),
|
||||
rowText(
|
||||
"SubTotal".tr(),
|
||||
"SubTotal".tr,
|
||||
Constant.amountShow(amount: controller.subTotal.value.toString()),
|
||||
isDark,
|
||||
),
|
||||
@@ -2183,7 +2183,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
// Total Amount
|
||||
rowText(
|
||||
"Total Amount".tr(),
|
||||
"Total Amount".tr,
|
||||
Constant.amountShow(
|
||||
amount: controller.totalAmount.value.toString(),
|
||||
),
|
||||
@@ -2227,7 +2227,7 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
AlertDialog(
|
||||
backgroundColor: isDark ? AppThemeData.greyDark50 : AppThemeData.grey50,
|
||||
title: Text(
|
||||
'Please give reason for canceling this Booking'.tr(),
|
||||
'Please give reason for canceling this Booking'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.greyDark900 : AppThemeData.grey900,
|
||||
@@ -2237,26 +2237,26 @@ class OnDemandOrderDetailsScreen extends StatelessWidget {
|
||||
controller: controller.cancelBookingController.value,
|
||||
maxLines: 5,
|
||||
decoration: InputDecoration(
|
||||
hintText: "Specify your reason here".tr(),
|
||||
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)),
|
||||
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,7 +1,7 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/0n_demand_payment_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../payment/createRazorPayOrderModel.dart';
|
||||
@@ -53,7 +53,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Select Payment Method".tr(),
|
||||
"Select Payment Method".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -79,7 +79,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr(),
|
||||
"Preferred Payment".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 15,
|
||||
@@ -158,7 +158,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,
|
||||
@@ -329,7 +329,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Continue".tr(),
|
||||
title: "Continue".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
@@ -400,12 +400,12 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
if (walletAmount == 0) {
|
||||
ShowToastDialog.showToast(
|
||||
"Wallet balance is 0. Please recharge wallet."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else if (walletAmount < totalAmount) {
|
||||
ShowToastDialog.showToast(
|
||||
"Insufficient wallet balance. Please add funds."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else {
|
||||
controller.placeOrder();
|
||||
@@ -461,7 +461,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
Get.back();
|
||||
ShowToastDialog.showToast(
|
||||
"Something went wrong, please contact admin."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else {
|
||||
CreateRazorPayOrderModel result =
|
||||
@@ -476,7 +476,7 @@ class OnDemandPaymentScreen extends StatelessWidget {
|
||||
} else {
|
||||
controller.isOrderPlaced.value = false;
|
||||
ShowToastDialog.showToast(
|
||||
"Please select payment method".tr(),
|
||||
"Please select payment method".tr,
|
||||
);
|
||||
}
|
||||
controller.isOrderPlaced.value = false;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/on_demand_review_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
@@ -53,8 +52,8 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
controller.ratingModel.value != null
|
||||
? "Update Review".tr()
|
||||
: "Add Review".tr(),
|
||||
? "Update Review".tr
|
||||
: "Add Review".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -97,7 +96,7 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
'Rate for'.tr(),
|
||||
'Rate for'.tr,
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
fontSize: 18,
|
||||
color:
|
||||
@@ -154,7 +153,7 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: EdgeInsets.all(20.0),
|
||||
child: TextFieldWidget(
|
||||
hintText: "Type comment....".tr(),
|
||||
hintText: "Type comment....".tr,
|
||||
controller: controller.comment,
|
||||
maxLine: 5,
|
||||
),
|
||||
@@ -165,8 +164,8 @@ class OnDemandReviewScreen extends StatelessWidget {
|
||||
title:
|
||||
controller.ratingModel.value !=
|
||||
null
|
||||
? "Update Review".tr()
|
||||
: "Add Review".tr(),
|
||||
? "Update Review".tr
|
||||
: "Add Review".tr,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: controller.submitReview,
|
||||
|
||||
@@ -8,9 +8,9 @@ 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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
@@ -29,7 +29,7 @@ class ProviderInboxScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Provider Inbox".tr(),
|
||||
"Provider Inbox".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -46,7 +46,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(),
|
||||
@@ -157,7 +157,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')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../controllers/provider_controller.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../models/provider_serivce_model.dart';
|
||||
@@ -143,7 +143,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,7 +1,7 @@
|
||||
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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../controllers/view_all_popular_service_controller.dart';
|
||||
@@ -50,7 +50,7 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"All Services".tr(),
|
||||
"All Services".tr,
|
||||
style: AppThemeData.boldTextStyle(
|
||||
fontSize: 18,
|
||||
color: AppThemeData.grey900,
|
||||
@@ -71,7 +71,7 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
TextFieldWidget(
|
||||
hintText: "Search Service".tr(),
|
||||
hintText: "Search Service".tr,
|
||||
controller:
|
||||
controller.searchTextFiledController.value,
|
||||
onchange:
|
||||
@@ -83,7 +83,7 @@ class ViewAllPopularServiceScreen extends StatelessWidget {
|
||||
? Expanded(
|
||||
child: Center(
|
||||
child: Constant.showEmptyView(
|
||||
message: "No service Found".tr(),
|
||||
message: "No service Found".tr,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../constant/constant.dart';
|
||||
import '../../controllers/theme_controller.dart';
|
||||
import '../../controllers/view_category_service_controller.dart';
|
||||
@@ -64,7 +63,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,
|
||||
|
||||
@@ -8,9 +8,9 @@ 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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
@@ -29,7 +29,7 @@ class WorkerInboxScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Worker Inbox".tr(),
|
||||
"Worker Inbox".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -46,7 +46,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(),
|
||||
@@ -160,7 +160,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')
|
||||
|
||||
Reference in New Issue
Block a user