BASE: Initialize Localization.
This commit is contained in:
@@ -6,6 +6,7 @@ import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -33,7 +34,7 @@ class AllAdvertisementScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Highlights for you".tr,
|
||||
"Highlights for you".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -42,7 +43,7 @@ class AllAdvertisementScreen extends StatelessWidget {
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.advertisementList.isEmpty
|
||||
? Constant.showEmptyView(message: "Highlights for you not found.".tr)
|
||||
? Constant.showEmptyView(message: "Highlights for you not found.".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: ListView.builder(
|
||||
@@ -72,7 +73,7 @@ class AdvertisementCard extends StatelessWidget {
|
||||
final isDark = themeController.isDark.value;
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel = await FireStoreUtils.getVendorById(model.vendorId!);
|
||||
ShowToastDialog.closeLoader();
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -44,7 +45,7 @@ class CartScreen extends StatelessWidget {
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface),
|
||||
body:
|
||||
cartItem.isEmpty
|
||||
? Constant.showEmptyView(message: "Item Not available".tr)
|
||||
? Constant.showEmptyView(message: "Item Not available".tr())
|
||||
: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -62,7 +63,7 @@ class CartScreen 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());
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -252,20 +253,20 @@ class CartScreen extends StatelessWidget {
|
||||
-1) {
|
||||
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
} else {
|
||||
if ((productModel!.quantity ?? 0) > (cartProductModel.quantity ?? 0) || productModel!.quantity == -1) {
|
||||
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((productModel!.quantity ?? 0) > (cartProductModel.quantity ?? 0) || productModel!.quantity == -1) {
|
||||
controller.addToCart(cartProductModel: cartProductModel, isIncrement: true, quantity: cartProductModel.quantity! + 1);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -285,7 +286,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Variants".tr,
|
||||
"Variants".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -324,7 +325,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Addons".tr,
|
||||
"Addons".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -381,7 +382,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${'Delivery Type'.tr} (${controller.selectedFoodType.value})".tr,
|
||||
"${'Delivery Type'.tr()} (${controller.selectedFoodType.value})".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -400,13 +401,13 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Instant Delivery".tr,
|
||||
"Instant Delivery".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"Standard".tr,
|
||||
"Standard".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
|
||||
),
|
||||
@@ -415,7 +416,7 @@ class CartScreen extends StatelessWidget {
|
||||
),
|
||||
Radio(
|
||||
value: controller.deliveryType.value,
|
||||
groupValue: "instant".tr,
|
||||
groupValue: "instant".tr(),
|
||||
activeColor: AppThemeData.primary300,
|
||||
onChanged: (value) {
|
||||
controller.deliveryType.value = "instant";
|
||||
@@ -438,7 +439,7 @@ class CartScreen extends StatelessWidget {
|
||||
},
|
||||
minDateTime: DateTime.now(),
|
||||
displaySubmitButton: true,
|
||||
pickerTitle: Text('Schedule Time'.tr),
|
||||
pickerTitle: Text('Schedule Time'.tr()),
|
||||
buttonSingleColor: AppThemeData.primary300,
|
||||
).show(context);
|
||||
},
|
||||
@@ -451,13 +452,13 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Schedule Time".tr,
|
||||
"Schedule Time".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text(
|
||||
"${'Your preferred time'.tr} ${controller.deliveryType.value == "schedule" ? Constant.timestampToDateTime(Timestamp.fromDate(controller.scheduleDateTime.value)) : ""}",
|
||||
"${'Your preferred time'.tr()} ${controller.deliveryType.value == "schedule" ? Constant.timestampToDateTime(Timestamp.fromDate(controller.scheduleDateTime.value)) : ""}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500),
|
||||
),
|
||||
@@ -466,7 +467,7 @@ class CartScreen extends StatelessWidget {
|
||||
),
|
||||
Radio(
|
||||
value: controller.deliveryType.value,
|
||||
groupValue: "schedule".tr,
|
||||
groupValue: "schedule".tr(),
|
||||
activeColor: AppThemeData.primary300,
|
||||
onChanged: (value) {
|
||||
controller.deliveryType.value = "schedule";
|
||||
@@ -477,7 +478,7 @@ class CartScreen extends StatelessWidget {
|
||||
},
|
||||
minDateTime: controller.scheduleDateTime.value,
|
||||
displaySubmitButton: true,
|
||||
pickerTitle: Text('Schedule Time'.tr),
|
||||
pickerTitle: Text('Schedule Time'.tr()),
|
||||
buttonSingleColor: AppThemeData.primary300,
|
||||
).show(context);
|
||||
},
|
||||
@@ -497,7 +498,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Offers & Benefits".tr,
|
||||
"Offers & Benefits".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -520,7 +521,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Apply Coupons".tr,
|
||||
"Apply Coupons".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -542,7 +543,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Bill Details".tr,
|
||||
"Bill Details".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -563,7 +564,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Item totals".tr,
|
||||
"Item totals".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -583,14 +584,14 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Delivery Fee".tr,
|
||||
"Delivery Fee".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
),
|
||||
(controller.vendorModel.value.isSelfDelivery == true && Constant.isSelfDeliveryFeature == true)
|
||||
? Text(
|
||||
'Free Delivery'.tr,
|
||||
'Free Delivery'.tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16),
|
||||
)
|
||||
@@ -609,7 +610,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Coupon Discount".tr,
|
||||
"Coupon Discount".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -630,7 +631,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Special Discount".tr,
|
||||
"Special Discount".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -656,7 +657,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Delivery Tips".tr,
|
||||
"Delivery Tips".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -668,7 +669,7 @@ class CartScreen extends StatelessWidget {
|
||||
controller.calculatePrice();
|
||||
},
|
||||
child: Text(
|
||||
"Remove".tr,
|
||||
"Remove".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
@@ -728,7 +729,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"To Pay".tr,
|
||||
"To Pay".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -756,7 +757,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Thanks with a tip!".tr,
|
||||
"Thanks with a tip!".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -777,7 +778,7 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Around the clock, our delivery partners make it happen. Show gratitude with a tip..".tr,
|
||||
"Around the clock, our delivery partners make it happen. Show gratitude with a tip..".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600),
|
||||
),
|
||||
@@ -927,7 +928,7 @@ class CartScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'Other'.tr,
|
||||
'Other'.tr(),
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
fontSize: 14,
|
||||
@@ -952,7 +953,7 @@ class CartScreen extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [TextFieldWidget(title: 'Remarks'.tr, controller: controller.reMarkController.value, hintText: 'Write remarks for the store'.tr, maxLine: 4)]),
|
||||
child: Column(children: [TextFieldWidget(title: 'Remarks'.tr(), controller: controller.reMarkController.value, hintText: 'Write remarks for the store'.tr(), maxLine: 4)]),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -973,14 +974,14 @@ class CartScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
child: Text("Cashback Offer".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 13)),
|
||||
child: Text("Cashback Offer".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 13)),
|
||||
),
|
||||
Text(
|
||||
"${"Cashback Name :".tr} ${controller.bestCashback.value.title ?? ''}",
|
||||
"${"Cashback Name :".tr()} ${controller.bestCashback.value.title ?? ''}",
|
||||
style: TextStyle(color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontSize: 13),
|
||||
),
|
||||
Text(
|
||||
"${"You will get".tr} ${Constant.amountShow(amount: controller.bestCashback.value.cashbackValue?.toStringAsFixed(2))} ${"cashback after completing the order.".tr}",
|
||||
"${"You will get".tr()} ${Constant.amountShow(amount: controller.bestCashback.value.cashbackValue?.toStringAsFixed(2))} ${"cashback after completing the order.".tr()}",
|
||||
style: TextStyle(color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontSize: 13),
|
||||
),
|
||||
],
|
||||
@@ -1034,7 +1035,7 @@ class CartScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Pay Via".tr,
|
||||
"Pay Via".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 12),
|
||||
),
|
||||
@@ -1060,7 +1061,7 @@ class CartScreen extends StatelessWidget {
|
||||
: isDark
|
||||
? AppThemeData.grey800
|
||||
: AppThemeData.grey100,
|
||||
title: "Pay Now".tr,
|
||||
title: "Pay Now".tr(),
|
||||
height: 5,
|
||||
color:
|
||||
controller.selectedPaymentMethod.value != ''
|
||||
@@ -1071,11 +1072,11 @@ class CartScreen extends StatelessWidget {
|
||||
fontSizes: 16,
|
||||
onPress: () async {
|
||||
if ((controller.couponAmount.value >= 1) && (controller.couponAmount.value > controller.totalAmount.value)) {
|
||||
ShowToastDialog.showToast("The total price must be greater than or equal to the coupon discount value for the code to apply. Please review your cart total.".tr);
|
||||
ShowToastDialog.showToast("The total price must be greater than or equal to the coupon discount value for the code to apply. Please review your cart total.".tr());
|
||||
return;
|
||||
}
|
||||
if ((controller.specialDiscountAmount.value >= 1) && (controller.specialDiscountAmount.value > controller.totalAmount.value)) {
|
||||
ShowToastDialog.showToast("The total price must be greater than or equal to the special discount value for the code to apply. Please review your cart total.".tr);
|
||||
ShowToastDialog.showToast("The total price must be greater than or equal to the special discount value for the code to apply. Please review your cart total.".tr());
|
||||
return;
|
||||
}
|
||||
if (controller.isOrderPlaced.value == false) {
|
||||
@@ -1109,7 +1110,7 @@ class CartScreen extends StatelessWidget {
|
||||
) {
|
||||
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.toString(), orderId: result.id);
|
||||
@@ -1117,7 +1118,7 @@ class CartScreen 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;
|
||||
}
|
||||
@@ -1162,16 +1163,16 @@ class CartScreen extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
TextFieldWidget(
|
||||
title: 'Tips Amount'.tr,
|
||||
title: 'Tips Amount'.tr(),
|
||||
controller: controller.tipsController.value,
|
||||
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||
prefix: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
child: Text(Constant.currencyModel!.symbol.tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18)),
|
||||
child: Text(Constant.currencyModel!.symbol.tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18)),
|
||||
),
|
||||
hintText: 'Enter Tips Amount'.tr,
|
||||
hintText: 'Enter Tips Amount'.tr(),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Row(
|
||||
@@ -1179,7 +1180,7 @@ class CartScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Cancel".tr,
|
||||
title: "Cancel".tr(),
|
||||
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
|
||||
textColor: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
onPress: () async {
|
||||
@@ -1191,12 +1192,12 @@ class CartScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Add".tr,
|
||||
title: "Add".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
if (controller.tipsController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please enter tips Amount".tr);
|
||||
ShowToastDialog.showToast("Please enter tips Amount".tr());
|
||||
} else {
|
||||
controller.deliveryTips.value = double.parse(controller.tipsController.value.text);
|
||||
controller.calculatePrice();
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/widget/my_separator.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 '../../../controllers/theme_controller.dart';
|
||||
@@ -27,20 +28,20 @@ class CouponListScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Coupon Code".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Coupon Code".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
bottom: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(55),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFieldWidget(
|
||||
hintText: 'Enter coupon code'.tr,
|
||||
hintText: 'Enter coupon code'.tr(),
|
||||
controller: controller.couponCodeController.value,
|
||||
suffix: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
if (controller.couponCodeController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please enter coupon code".tr);
|
||||
ShowToastDialog.showToast("Please enter coupon code".tr());
|
||||
return;
|
||||
}
|
||||
CouponModel? matchedCoupon = controller.couponList.firstWhereOrNull((coupon) => coupon.code!.toLowerCase() == controller.couponCodeController.value.text.toLowerCase());
|
||||
@@ -52,14 +53,14 @@ class CouponListScreen extends StatelessWidget {
|
||||
controller.calculatePrice();
|
||||
Get.back();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Coupon code not applied".tr);
|
||||
ShowToastDialog.showToast("Coupon code not applied".tr());
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast("Invalid Coupon".tr);
|
||||
ShowToastDialog.showToast("Invalid Coupon".tr());
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
"Apply".tr,
|
||||
"Apply".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
@@ -93,7 +94,7 @@ class CouponListScreen extends StatelessWidget {
|
||||
child: RotatedBox(
|
||||
quarterTurns: -1,
|
||||
child: Text(
|
||||
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr}",
|
||||
"${couponModel.discountType == "Fix Price" ? Constant.amountShow(amount: couponModel.discount) : "${couponModel.discount}%"} ${'Off'.tr()}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
|
||||
),
|
||||
@@ -132,11 +133,11 @@ class CouponListScreen extends StatelessWidget {
|
||||
controller.calculatePrice();
|
||||
Get.back();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Coupon code not applied".tr);
|
||||
ShowToastDialog.showToast("Coupon code not applied".tr());
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
"Tap To Apply".tr,
|
||||
"Tap To Apply".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/models/cart_product_model.dart';
|
||||
import 'package:customer/screen_ui/ecommarce/dash_board_e_commerce_screen.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:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -38,12 +39,12 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Order Placed".tr,
|
||||
"Order Placed".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
|
||||
),
|
||||
Text(
|
||||
"Hang tight — your items are being delivered quickly and safely!".tr,
|
||||
"Hang tight — your items are being delivered quickly and safely!".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
@@ -63,7 +64,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Order ID".tr,
|
||||
"Order ID".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
|
||||
),
|
||||
@@ -92,12 +93,12 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
Center(child: Image.asset("assets/images/ic_timer.gif", height: 140)),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Placing your order".tr,
|
||||
"Placing your order".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 34, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w400),
|
||||
),
|
||||
Text(
|
||||
"Take a moment to review your order before proceeding to checkout.".tr,
|
||||
"Take a moment to review your order before proceeding to checkout.".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
@@ -117,7 +118,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Delivery Address".tr,
|
||||
"Delivery Address".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
|
||||
),
|
||||
@@ -150,7 +151,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Order Summary".tr,
|
||||
"Order Summary".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 16),
|
||||
),
|
||||
@@ -167,12 +168,12 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${cartProductModel.quantity} x".tr,
|
||||
"${cartProductModel.quantity} x".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
Text(
|
||||
"${cartProductModel.name}".tr,
|
||||
"${cartProductModel.name}".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
@@ -196,7 +197,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
controller.isPlacing.value
|
||||
? RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Track Order".tr,
|
||||
title: "Track Order".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -215,7 +216,7 @@ class OrderPlacingScreen extends StatelessWidget {
|
||||
)
|
||||
: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Track Order".tr,
|
||||
title: "Track Order".tr(),
|
||||
height: 5.5,
|
||||
color: isDark ? AppThemeData.grey700 : AppThemeData.grey200,
|
||||
textColor: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/cart_controller.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:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -26,7 +27,7 @@ class SelectPaymentScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Payment Option".tr,
|
||||
"Payment Option".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -42,7 +43,7 @@ class SelectPaymentScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr,
|
||||
"Preferred Payment".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -92,7 +93,7 @@ class SelectPaymentScreen extends StatelessWidget {
|
||||
height: 10,
|
||||
),
|
||||
Text(
|
||||
"Other Payment Options".tr,
|
||||
"Other Payment Options".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -180,7 +181,7 @@ class SelectPaymentScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "${'Pay Now'.tr} | ${Constant.amountShow(amount: controller.totalAmount.value.toString())}".tr,
|
||||
title: "${'Pay Now'.tr()} | ${Constant.amountShow(amount: controller.totalAmount.value.toString())}".tr(),
|
||||
height: 5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/cashback_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -20,7 +21,7 @@ class CashbackOffersListScreen extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Cashback Offers".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Cashback Offers".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
),
|
||||
body:
|
||||
@@ -59,11 +60,11 @@ class CashbackOffersListScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
"${"Min spent".tr} ${Constant.amountShow(amount: "${controller.cashbackList[index].minimumPurchaseAmount ?? 0.0}")} | ${"Valid till".tr} ${Constant.timestampToDateTime2(controller.cashbackList[index].endDate!)}",
|
||||
"${"Min spent".tr()} ${Constant.amountShow(amount: "${controller.cashbackList[index].minimumPurchaseAmount ?? 0.0}")} | ${"Valid till".tr()} ${Constant.timestampToDateTime2(controller.cashbackList[index].endDate!)}",
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontSize: 14),
|
||||
),
|
||||
Text(
|
||||
"${"Maximum cashback up to".tr} ${Constant.amountShow(amount: "${controller.cashbackList[index].maximumDiscount ?? 0.0}")}",
|
||||
"${"Maximum cashback up to".tr()} ${Constant.amountShow(amount: "${controller.cashbackList[index].maximumDiscount ?? 0.0}")}",
|
||||
style: TextStyle(color: isDark ? AppThemeData.primary200 : AppThemeData.primary300, fontFamily: AppThemeData.regular, fontSize: 14),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/controllers/change_language_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/utils/preferences.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
@@ -30,11 +31,11 @@ class ChangeLanguageScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Change Language".tr,
|
||||
"Change Language".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Select your preferred language for a personalized app experience.".tr,
|
||||
"Select your preferred language for a personalized app experience.".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/chat_controller.dart';
|
||||
import 'package:customer/models/conversation_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
@@ -55,7 +56,7 @@ class ChatScreen extends StatelessWidget {
|
||||
ConversationModel inboxModel = ConversationModel.fromJson(documentSnapshots[index].data() as Map<String, dynamic>);
|
||||
return chatItemView(isDark, inboxModel.senderId == FireStoreUtils.getCurrentUid(), inboxModel);
|
||||
},
|
||||
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(
|
||||
@@ -103,7 +104,7 @@ class ChatScreen extends StatelessWidget {
|
||||
contentPadding: const EdgeInsets.only(top: 3, left: 10),
|
||||
focusedBorder: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
hintText: 'Type message here....'.tr,
|
||||
hintText: 'Type message here....'.tr(),
|
||||
),
|
||||
onSubmitted: (value) async {
|
||||
if (controller.messageController.value.text.isNotEmpty) {
|
||||
@@ -245,7 +246,7 @@ class ChatScreen extends StatelessWidget {
|
||||
|
||||
void onCameraClick(BuildContext context, ChatController controller) {
|
||||
final action = CupertinoActionSheet(
|
||||
message: Text('Send Media'.tr, style: const TextStyle(fontSize: 15.0)),
|
||||
message: Text('Send Media'.tr(), style: const TextStyle(fontSize: 15.0)),
|
||||
actions: <Widget>[
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: false,
|
||||
@@ -257,7 +258,7 @@ class ChatScreen extends StatelessWidget {
|
||||
controller.sendMessage('', url, '', 'image');
|
||||
}
|
||||
},
|
||||
child: Text("Choose image from gallery".tr),
|
||||
child: Text("Choose image from gallery".tr()),
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
isDefaultAction: false,
|
||||
@@ -271,7 +272,7 @@ class ChatScreen extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
},
|
||||
child: Text("Choose video from gallery".tr),
|
||||
child: Text("Choose video from gallery".tr()),
|
||||
),
|
||||
CupertinoActionSheetAction(
|
||||
isDestructiveAction: false,
|
||||
@@ -283,7 +284,7 @@ class ChatScreen extends StatelessWidget {
|
||||
controller.sendMessage('', url, '', 'image');
|
||||
}
|
||||
},
|
||||
child: Text("Take a picture".tr),
|
||||
child: Text("Take a picture".tr()),
|
||||
),
|
||||
// CupertinoActionSheetAction(
|
||||
// isDestructiveAction: false,
|
||||
@@ -295,11 +296,11 @@ class ChatScreen extends StatelessWidget {
|
||||
// controller.sendMessage('', videoContainer.videoUrl, videoContainer.thumbnailUrl, 'video');
|
||||
// }
|
||||
// },
|
||||
// child: Text("Record video".tr),
|
||||
// child: Text("Record video".tr()),
|
||||
// )
|
||||
],
|
||||
cancelButton: CupertinoActionSheetAction(
|
||||
child: Text('Cancel'.tr),
|
||||
child: Text('Cancel'.tr()),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/models/user_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -27,7 +28,7 @@ class DriverInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Driver Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Driver 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 DriverInboxScreen 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 DriverInboxScreen 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_driver').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -28,7 +29,7 @@ class RestaurantInboxScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Store Inbox".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Store 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.
|
||||
@@ -38,7 +39,7 @@ class RestaurantInboxScreen 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());
|
||||
@@ -115,7 +116,7 @@ class RestaurantInboxScreen 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_store').where("customerId", isEqualTo: FireStoreUtils.getCurrentUid()).orderBy('createdAt', descending: true),
|
||||
//Change types customerId
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/dash_board_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';
|
||||
@@ -40,17 +41,17 @@ class DashBoardScreen extends StatelessWidget {
|
||||
items:
|
||||
Constant.walletSetting == false
|
||||
? [
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.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_orders.svg", label: 'Orders'.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.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_orders.svg", label: 'Orders'.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.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_wallet.svg", label: 'Wallet'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr, controller: controller),
|
||||
navigationBarItem(isDark, index: 0, assetIcon: "assets/icons/ic_home.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_wallet.svg", label: 'Wallet'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 3, assetIcon: "assets/icons/ic_orders.svg", label: 'Orders'.tr(), controller: controller),
|
||||
navigationBarItem(isDark, index: 4, assetIcon: "assets/icons/ic_profile.svg", label: 'Profile'.tr(), controller: controller),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/dine_in_booking_details_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';
|
||||
@@ -24,7 +25,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
titleSpacing: 0,
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
title: Text(
|
||||
"Dine in Bookings".tr,
|
||||
"Dine in Bookings".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -43,11 +44,11 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${'Order'.tr} ${Constant.orderId(orderId: controller.bookingModel.value.id.toString())}",
|
||||
"${'Order'.tr()} ${Constant.orderId(orderId: controller.bookingModel.value.id.toString())}",
|
||||
style: TextStyle(fontSize: 18, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
"${controller.bookingModel.value.totalGuest} ${'Peoples'.tr}",
|
||||
"${controller.bookingModel.value.totalGuest} ${'Peoples'.tr()}",
|
||||
style: TextStyle(fontSize: 14, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
@@ -113,7 +114,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"View in Map".tr,
|
||||
"View in Map".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
@@ -133,7 +134,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
"Call Now".tr,
|
||||
"Call Now".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
@@ -153,7 +154,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Booking Details".tr,
|
||||
"Booking Details".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -169,7 +170,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Name".tr,
|
||||
"Name".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
@@ -188,7 +189,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Phone number".tr,
|
||||
"Phone number".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
@@ -207,7 +208,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Date and Time".tr,
|
||||
"Date and Time".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
@@ -226,7 +227,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Guest".tr,
|
||||
"Guest".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
@@ -245,7 +246,7 @@ class DineInBookingDetails extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Discount".tr,
|
||||
"Discount".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/dine_in_booking_controller.dart';
|
||||
import 'package:customer/models/dine_in_booking_model.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.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';
|
||||
@@ -27,7 +28,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
titleSpacing: 0,
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
title: Text(
|
||||
"Dine in Bookings".tr,
|
||||
"Dine in Bookings".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -57,7 +58,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Upcoming".tr,
|
||||
"Upcoming".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -88,7 +89,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"History".tr,
|
||||
"History".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -118,7 +119,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.isFeature.value
|
||||
? controller.featureList.isEmpty
|
||||
? Constant.showEmptyView(message: "Upcoming Booking not found.".tr)
|
||||
? Constant.showEmptyView(message: "Upcoming Booking not found.".tr())
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -130,7 +131,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
},
|
||||
)
|
||||
: controller.historyList.isEmpty
|
||||
? Constant.showEmptyView(message: "History not found.".tr)
|
||||
? Constant.showEmptyView(message: "History not found.".tr())
|
||||
: ListView.builder(
|
||||
itemCount: controller.historyList.length,
|
||||
shrinkWrap: true,
|
||||
@@ -208,7 +209,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: Text("Name".tr, style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400))),
|
||||
Expanded(child: Text("Name".tr(), style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400))),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${orderModel.guestFirstName} ${orderModel.guestLastName}",
|
||||
@@ -223,7 +224,7 @@ class DineInBookingScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text("Guest Number".tr, style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400)),
|
||||
child: Text("Guest Number".tr(), style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400)),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -27,7 +28,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
title: Text("Book Table".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
title: Text("Book Table".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -43,7 +44,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Numbers of Guests".tr,
|
||||
"Numbers of Guests".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -105,7 +106,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"When are you visiting?".tr,
|
||||
"When are you visiting?".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
SizedBox(
|
||||
@@ -151,9 +152,9 @@ class BookTableScreen extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
Constant.calculateDifference(controller.dateList[index].date.toDate()) == 0
|
||||
? "Today".tr
|
||||
? "Today".tr()
|
||||
: Constant.calculateDifference(controller.dateList[index].date.toDate()) == 1
|
||||
? "Tomorrow".tr
|
||||
? "Tomorrow".tr()
|
||||
: DateFormat('EEE').format(controller.dateList[index].date.toDate()),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
@@ -185,7 +186,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
child: Center(
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "${controller.dateList[index].discountPer}%".tr,
|
||||
title: "${controller.dateList[index].discountPer}%".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
width: 12,
|
||||
@@ -201,7 +202,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Select time slot and scroll to see offers".tr,
|
||||
"Select time slot and scroll to see offers".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -256,7 +257,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Special Occasion".tr,
|
||||
"Special Occasion".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -264,7 +265,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
onTap: () {
|
||||
controller.selectedOccasion.value = "";
|
||||
},
|
||||
child: Text("Clear".tr, style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
|
||||
child: Text("Clear".tr(), style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -282,7 +283,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
visualDensity: const VisualDensity(horizontal: 0, vertical: -4),
|
||||
dense: true,
|
||||
title: Text(
|
||||
//'${controller.occasionList[i]}'.tr,
|
||||
//'${controller.occasionList[i]}'.tr(),
|
||||
controller.getLocalizedOccasion(controller.occasionList[i]),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
@@ -301,7 +302,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
visualDensity: const VisualDensity(horizontal: 0, vertical: -4),
|
||||
dense: true,
|
||||
title: Text(
|
||||
'Is this your first visit?'.tr,
|
||||
'Is this your first visit?'.tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
leading: Checkbox(
|
||||
@@ -319,7 +320,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Personal Details".tr,
|
||||
"Personal Details".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -358,11 +359,11 @@ class BookTableScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Additional Requests".tr,
|
||||
"Additional Requests".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
TextFieldWidget(controller: controller.additionRequestController.value, hintText: 'Add message here....'.tr, maxLine: 5),
|
||||
TextFieldWidget(controller: controller.additionRequestController.value, hintText: 'Add message here....'.tr(), maxLine: 5),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
@@ -375,7 +376,7 @@ class BookTableScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Book Now".tr,
|
||||
title: "Book Now".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/models/favourite_model.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
@@ -215,7 +216,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
Get.to(const ReviewListScreen(), arguments: {"vendorModel": controller.vendorModel.value});
|
||||
},
|
||||
child: Text(
|
||||
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr}",
|
||||
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr()}",
|
||||
style: TextStyle(decoration: TextDecoration.underline, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular),
|
||||
),
|
||||
),
|
||||
@@ -226,7 +227,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
controller.isOpen.value ? "Open".tr : "Close".tr,
|
||||
controller.isOpen.value ? "Open".tr() : "Close".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -243,7 +244,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
timeShowBottomSheet(context, controller);
|
||||
},
|
||||
child: Text(
|
||||
"View Timings".tr,
|
||||
"View Timings".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -259,7 +260,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
Padding(padding: const EdgeInsets.symmetric(horizontal: 10), child: Icon(Icons.circle, size: 5, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500)),
|
||||
Text(
|
||||
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost)} ${'for two'.tr}".tr,
|
||||
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost)} ${'for two'.tr()}".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -277,7 +278,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Also applicable on food delivery".tr,
|
||||
"Also applicable on food delivery".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -292,7 +293,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (Constant.userModel == null) {
|
||||
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr);
|
||||
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr());
|
||||
} else {
|
||||
Get.to(const BookTableScreen(), arguments: {"vendorModel": controller.vendorModel.value});
|
||||
}
|
||||
@@ -326,7 +327,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Table Booking".tr,
|
||||
"Table Booking".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
@@ -335,7 +336,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Quick Conformations".tr,
|
||||
"Quick Conformations".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
|
||||
@@ -386,7 +387,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Available food delivery".tr,
|
||||
"Available food delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
@@ -395,7 +396,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"in 30-45 mins.".tr,
|
||||
"in 30-45 mins.".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
|
||||
@@ -421,7 +422,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Menu".tr,
|
||||
"Menu".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -466,7 +467,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Location, Timing & Costs".tr,
|
||||
"Location, Timing & Costs".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -508,7 +509,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"View on Map".tr,
|
||||
"View on Map".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -533,7 +534,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Timing".tr,
|
||||
"Timing".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -545,7 +546,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Text(
|
||||
"${controller.vendorModel.value.openDineTime == '' ? "10:00 AM" : controller.vendorModel.value.openDineTime.toString()} ${"To".tr} ${controller.vendorModel.value.closeDineTime == '' ? "10:00 PM" : controller.vendorModel.value.closeDineTime.toString()}",
|
||||
"${controller.vendorModel.value.openDineTime == '' ? "10:00 AM" : controller.vendorModel.value.openDineTime.toString()} ${"To".tr()} ${controller.vendorModel.value.closeDineTime == '' ? "10:00 PM" : controller.vendorModel.value.closeDineTime.toString()}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -573,7 +574,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Cost for Two".tr,
|
||||
"Cost for Two".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -583,7 +584,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost ?? "0.0")} ${'(approx)'.tr}",
|
||||
"${Constant.amountShow(amount: controller.vendorModel.value.restaurantCost ?? "0.0")} ${'(approx)'.tr()}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
@@ -603,7 +604,7 @@ class DineInDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Cuisines".tr,
|
||||
"Cuisines".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -80,7 +81,7 @@ class DineInScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Dine-In Reservations".tr,
|
||||
"Dine-In Reservations".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -93,7 +94,7 @@ class DineInScreen extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Book a table at your favorite restaurant and enjoy a delightful dining experience."
|
||||
.tr,
|
||||
.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
@@ -131,7 +132,7 @@ class DineInScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"No Store Found in Your Area".tr,
|
||||
"No Store Found in Your Area".tr(),
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -144,7 +145,7 @@ class DineInScreen 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:
|
||||
@@ -158,7 +159,7 @@ class DineInScreen extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Change Zone".tr,
|
||||
title: "Change Zone".tr(),
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -182,7 +183,7 @@ class DineInScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
titleView(
|
||||
isDark,
|
||||
"Explore the Categories".tr,
|
||||
"Explore the Categories".tr(),
|
||||
() {
|
||||
Get.to(const ViewAllCategoryDineInScreen());
|
||||
},
|
||||
@@ -218,7 +219,7 @@ class DineInScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"New Arrivals".tr,
|
||||
"New Arrivals".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -244,7 +245,7 @@ class DineInScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr,
|
||||
"View all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -316,7 +317,7 @@ class DineInScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
"Popular Stores".tr,
|
||||
"Popular Stores".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -357,7 +358,7 @@ class DineInScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
"All Stores".tr,
|
||||
"All Stores".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -425,7 +426,7 @@ class DineInScreen extends StatelessWidget {
|
||||
onPress!();
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr,
|
||||
"View all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.regular,
|
||||
@@ -1292,7 +1293,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel =
|
||||
await FireStoreUtils.getVendorById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1304,7 +1305,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ProductModel? productModel =
|
||||
await FireStoreUtils.getProductById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -1324,7 +1325,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/view_all_category_controller.dart';
|
||||
import 'package:customer/models/vendor_category_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -25,7 +26,7 @@ class ViewAllCategoryDineInScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Categories".tr,
|
||||
"Categories".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -32,11 +33,11 @@ class EditProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Profile Information".tr,
|
||||
"Profile Information".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"View and update your personal details, contact information, and preferences.".tr,
|
||||
"View and update your personal details, contact information, and preferences.".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
@@ -79,13 +80,13 @@ class EditProfileScreen extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: TextFieldWidget(title: 'First Name'.tr, controller: controller.firstNameController.value, hintText: 'First Name'.tr)),
|
||||
Expanded(child: TextFieldWidget(title: 'First Name'.tr(), controller: controller.firstNameController.value, hintText: 'First Name'.tr())),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(child: TextFieldWidget(title: 'Last Name'.tr, controller: controller.lastNameController.value, hintText: 'Last Name'.tr)),
|
||||
Expanded(child: TextFieldWidget(title: 'Last Name'.tr(), controller: controller.lastNameController.value, hintText: 'Last Name'.tr())),
|
||||
],
|
||||
),
|
||||
TextFieldWidget(title: 'Email'.tr, textInputType: TextInputType.emailAddress, controller: controller.emailController.value, hintText: 'Email'.tr, enable: false),
|
||||
TextFieldWidget(title: 'Phone Number'.tr, textInputType: TextInputType.emailAddress, controller: controller.phoneNumberController.value, hintText: 'Phone Number'.tr, enable: false),
|
||||
TextFieldWidget(title: 'Email'.tr(), textInputType: TextInputType.emailAddress, controller: controller.emailController.value, hintText: 'Email'.tr(), enable: false),
|
||||
TextFieldWidget(title: 'Phone Number'.tr(), textInputType: TextInputType.emailAddress, controller: controller.phoneNumberController.value, hintText: 'Phone Number'.tr(), enable: false),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -97,7 +98,7 @@ class EditProfileScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
borderRadius: 10.r,
|
||||
title: "Save Details".tr,
|
||||
title: "Save Details".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -124,7 +125,7 @@ class EditProfileScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Padding(padding: const EdgeInsets.only(top: 15), child: Text("please select".tr, style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600))),
|
||||
Padding(padding: const EdgeInsets.only(top: 15), child: Text("please select".tr(), style: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600))),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
@@ -135,7 +136,7 @@ class EditProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(onPressed: () => controller.pickFile(source: ImageSource.camera), icon: const Icon(Icons.camera_alt, size: 32)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("camera".tr, style: const TextStyle())),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("camera".tr(), style: const TextStyle())),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -146,7 +147,7 @@ class EditProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(onPressed: () => controller.pickFile(source: ImageSource.gallery), icon: const Icon(Icons.photo_library_sharp, size: 32)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("gallery".tr, style: const TextStyle())),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("gallery".tr(), style: const TextStyle())),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -43,7 +44,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Your Favourites, All in One Place".tr,
|
||||
"Your Favourites, All in One Place".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -64,18 +65,18 @@ class FavouriteScreen 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 ? 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,
|
||||
@@ -113,7 +114,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Favourite Store".tr,
|
||||
"Favourite Store".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
@@ -134,7 +135,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Favourite Item".tr,
|
||||
"Favourite Item".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -164,7 +165,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.favouriteRestaurant.value
|
||||
? controller.favouriteVendorList.isEmpty
|
||||
? Constant.showEmptyView(message: "Favourite Store not found.".tr)
|
||||
? Constant.showEmptyView(message: "Favourite Store not found.".tr())
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
padding: EdgeInsets.zero,
|
||||
@@ -260,7 +261,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.success600,
|
||||
@@ -370,7 +371,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
},
|
||||
)
|
||||
: controller.favouriteFoodList.isEmpty
|
||||
? Constant.showEmptyView(message: "Favourite Item not found.".tr)
|
||||
? Constant.showEmptyView(message: "Favourite Item not found.".tr())
|
||||
: ListView.builder(
|
||||
itemCount: controller.favouriteFoodList.length,
|
||||
shrinkWrap: true,
|
||||
@@ -384,7 +385,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
return Constant.loader();
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('${"error".tr}: ${snapshot.error}'));
|
||||
return Center(child: Text('${"error".tr()}: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
} else {
|
||||
@@ -427,7 +428,7 @@ class FavouriteScreen extends StatelessWidget {
|
||||
: SvgPicture.asset("assets/icons/ic_veg.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
|
||||
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
|
||||
style: TextStyle(
|
||||
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:customer/controllers/forgot_password_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.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';
|
||||
@@ -26,13 +27,13 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Forgot Password".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
Text("No worries!! We’ll send you reset instructions".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.regular)),
|
||||
Text("Forgot Password".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 22, fontFamily: AppThemeData.semiBold)),
|
||||
Text("No worries!! We’ll send you reset instructions".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.regular)),
|
||||
const SizedBox(height: 32),
|
||||
TextFieldWidget(
|
||||
title: 'Email Address'.tr,
|
||||
title: 'Email Address'.tr(),
|
||||
controller: controller.emailEditingController.value,
|
||||
hintText: 'Enter email address'.tr,
|
||||
hintText: 'Enter email address'.tr(),
|
||||
prefix: Padding(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: SvgPicture.asset("assets/icons/ic_mail.svg", colorFilter: ColorFilter.mode(isDark ? AppThemeData.grey300 : AppThemeData.grey600, BlendMode.srcIn)),
|
||||
@@ -40,12 +41,12 @@ class ForgotPasswordScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
RoundedButtonFill(
|
||||
title: "Forgot Password".tr,
|
||||
title: "Forgot Password".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
if (controller.emailEditingController.value.text.trim().isEmpty) {
|
||||
ShowToastDialog.showToast("Please enter valid email".tr);
|
||||
ShowToastDialog.showToast("Please enter valid email".tr());
|
||||
} else {
|
||||
controller.forgotPassword();
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -32,7 +33,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Customize Gift Card".tr,
|
||||
"Customize Gift Card".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -97,16 +98,16 @@ class GiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
TextFieldWidget(
|
||||
title: 'Choose an amount'.tr,
|
||||
title: 'Choose an amount'.tr(),
|
||||
controller: controller.amountController.value,
|
||||
hintText: 'Enter gift card amount'.tr,
|
||||
hintText: 'Enter gift card amount'.tr(),
|
||||
textInputType: const TextInputType.numberWithOptions(signed: true, decimal: true),
|
||||
textInputAction: TextInputAction.done,
|
||||
inputFormatters: [FilteringTextInputFormatter.allow(RegExp('[0-9]'))],
|
||||
prefix: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
||||
child: Text(
|
||||
Constant.currencyModel!.symbol.tr,
|
||||
Constant.currencyModel!.symbol.tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontSize: 18),
|
||||
),
|
||||
),
|
||||
@@ -159,7 +160,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
TextFieldWidget(title: 'Add Message (Optional)'.tr, controller: controller.messageController.value, hintText: 'Add message here....'.tr, maxLine: 6),
|
||||
TextFieldWidget(title: 'Add Message (Optional)'.tr(), controller: controller.messageController.value, hintText: 'Add message here....'.tr(), maxLine: 6),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -170,7 +171,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "Continue".tr,
|
||||
title: "Continue".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -178,12 +179,12 @@ class GiftCardScreen extends StatelessWidget {
|
||||
onPress: () async {
|
||||
if (controller.amountController.value.text.isNotEmpty) {
|
||||
if (Constant.userModel == null) {
|
||||
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr);
|
||||
ShowToastDialog.showToast("Please log in to the application. You are not logged in.".tr());
|
||||
} else {
|
||||
giftCardBottomSheet(context, controller);
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast("Please enter Amount".tr);
|
||||
ShowToastDialog.showToast("Please enter Amount".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -229,7 +230,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: ShapeDecoration(color: AppThemeData.ecommerce50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))),
|
||||
child: Text(
|
||||
'Complete payment and share this e-gift card with loved ones using any app'.tr,
|
||||
'Complete payment and share this e-gift card with loved ones using any app'.tr(),
|
||||
style: TextStyle(color: AppThemeData.ecommerce300, fontSize: 14, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -238,7 +239,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Bill Details".tr,
|
||||
"Bill Details".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -255,7 +256,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Sub Total".tr,
|
||||
"Sub Total".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -273,7 +274,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Grand Total".tr,
|
||||
"Grand Total".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -294,7 +295,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
const SizedBox(height: 20),
|
||||
Center(
|
||||
child: Text(
|
||||
"${'Gift Card expire'.tr} ${controller.selectedGiftCard.value.expiryDay} ${'days after purchase'.tr}".tr,
|
||||
"${'Gift Card expire'.tr()} ${controller.selectedGiftCard.value.expiryDay} ${'days after purchase'.tr()}".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey500 : AppThemeData.grey400),
|
||||
),
|
||||
@@ -309,7 +310,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "${'Pay'.tr} ${Constant.amountShow(amount: controller.amountController.value.text)}",
|
||||
title: "${'Pay'.tr()} ${Constant.amountShow(amount: controller.amountController.value.text)}",
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/history_gift_card_controller.dart';
|
||||
import 'package:customer/models/gift_cards_order_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
@@ -26,7 +27,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child:
|
||||
controller.giftCardsOrderList.isEmpty
|
||||
? Constant.showEmptyView(message: "Purchased Gift card not found".tr)
|
||||
? Constant.showEmptyView(message: "Purchased Gift card not found".tr())
|
||||
: ListView.builder(
|
||||
itemCount: controller.giftCardsOrderList.length,
|
||||
shrinkWrap: true,
|
||||
@@ -71,7 +72,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gift Code".tr,
|
||||
"Gift Code".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -91,7 +92,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gift Pin".tr,
|
||||
"Gift Pin".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -157,7 +158,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'Share'.tr,
|
||||
'Share'.tr(),
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.grey300 : AppThemeData.grey600,
|
||||
fontSize: 14,
|
||||
@@ -174,7 +175,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
),
|
||||
const Expanded(child: SizedBox()),
|
||||
Text(
|
||||
giftCardOrderModel.redeem == true ? "Redeemed".tr : "Not Redeem".tr,
|
||||
giftCardOrderModel.redeem == true ? "Redeemed".tr() : "Not Redeem".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: giftCardOrderModel.redeem == true ? AppThemeData.success400 : AppThemeData.danger300,
|
||||
|
||||
@@ -7,6 +7,7 @@ import 'package:customer/models/wallet_transaction_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -38,25 +39,25 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Redeem Gift Card".tr,
|
||||
"Redeem Gift Card".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Enter your gift card code to enjoy discounts and special offers on your orders.".tr,
|
||||
"Enter your gift card code to enjoy discounts and special offers on your orders.".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
TextFieldWidget(
|
||||
title: 'Gift Code'.tr,
|
||||
title: 'Gift Code'.tr(),
|
||||
controller: controller.giftCodeController.value,
|
||||
hintText: 'Enter gift code'.tr,
|
||||
hintText: 'Enter gift code'.tr(),
|
||||
textInputType: TextInputType.number,
|
||||
prefix: Padding(padding: const EdgeInsets.all(10), child: SvgPicture.asset("assets/icons/ic_gift_code.svg")),
|
||||
),
|
||||
TextFieldWidget(
|
||||
title: 'Gift Pin'.tr,
|
||||
title: 'Gift Pin'.tr(),
|
||||
controller: controller.giftPinController.value,
|
||||
hintText: 'Enter gift pin'.tr,
|
||||
hintText: 'Enter gift pin'.tr(),
|
||||
textInputType: TextInputType.number,
|
||||
prefix: Padding(padding: const EdgeInsets.all(10), child: SvgPicture.asset("assets/icons/ic_gift_pin.svg")),
|
||||
),
|
||||
@@ -70,30 +71,30 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "Redeem".tr,
|
||||
title: "Redeem".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
fontSizes: 16,
|
||||
onPress: () async {
|
||||
if (controller.giftCodeController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please Enter Gift Code".tr);
|
||||
ShowToastDialog.showToast("Please Enter Gift Code".tr());
|
||||
} else if (controller.giftPinController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please Enter Gift Pin".tr);
|
||||
ShowToastDialog.showToast("Please Enter Gift Pin".tr());
|
||||
} else {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
await FireStoreUtils.checkRedeemCode(controller.giftCodeController.value.text.replaceAll(" ", "")).then((value) async {
|
||||
if (value != null) {
|
||||
GiftCardsOrderModel giftCodeModel = value;
|
||||
if (giftCodeModel.redeem == true) {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Gift voucher already redeemed".tr);
|
||||
ShowToastDialog.showToast("Gift voucher already redeemed".tr());
|
||||
} else if (giftCodeModel.giftPin != controller.giftPinController.value.text) {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Gift Pin Invalid".tr);
|
||||
ShowToastDialog.showToast("Gift Pin Invalid".tr());
|
||||
} else if (giftCodeModel.expireDate!.toDate().isBefore(DateTime.now())) {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Gift Voucher expire".tr);
|
||||
ShowToastDialog.showToast("Gift Voucher expire".tr());
|
||||
} else {
|
||||
giftCodeModel.redeem = true;
|
||||
|
||||
@@ -120,7 +121,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
DashBoardController controller = Get.put(DashBoardController());
|
||||
controller.selectedIndex.value = 2;
|
||||
}
|
||||
ShowToastDialog.showToast("Voucher redeem successfully".tr);
|
||||
ShowToastDialog.showToast("Voucher redeem successfully".tr());
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -128,7 +129,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Invalid Gift Code".tr);
|
||||
ShowToastDialog.showToast("Invalid Gift Code".tr());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/payment/createRazorPayOrderModel.dart';
|
||||
import 'package:customer/payment/rozorpayConroller.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';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
@@ -26,7 +27,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Payment Option".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Payment Option".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
@@ -35,7 +36,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr,
|
||||
"Preferred Payment".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -64,7 +65,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Other Payment Options".tr,
|
||||
"Other Payment Options".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -114,7 +115,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "Pay Now".tr,
|
||||
title: "Pay Now".tr(),
|
||||
height: 5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -144,14 +145,14 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
RazorPayController().createOrderRazorPay(amount: double.parse(controller.amountController.value.text), 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.amountController.value.text, orderId: result.id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ShowToastDialog.showToast("Please select payment method".tr);
|
||||
ShowToastDialog.showToast("Please select payment method".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/category_restaurant_controller.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.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';
|
||||
@@ -26,7 +27,7 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.allNearestRestaurant.isEmpty
|
||||
? Constant.showEmptyView(message: "No Restaurant found".tr)
|
||||
? Constant.showEmptyView(message: "No Restaurant found".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: ListView.builder(
|
||||
@@ -87,7 +88,7 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(fontSize: 14, color: AppThemeData.success600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:dotted_border/dotted_border.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';
|
||||
@@ -77,7 +78,7 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
child: Text(
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".toUpperCase().tr : " off".toUpperCase().tr}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".toUpperCase().tr() : " off".toUpperCase().tr()}",
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(overflow: TextOverflow.ellipsis, fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
|
||||
|
||||
@@ -22,6 +22,7 @@ import 'package:customer/utils/preferences.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_map/flutter_map.dart' as flutterMap;
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
@@ -92,7 +93,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
"No Store Found in Your Area".tr,
|
||||
"No Store Found in Your Area".tr(),
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -105,7 +106,7 @@ class HomeScreen 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:
|
||||
@@ -118,7 +119,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Change Zone".tr,
|
||||
title: "Change Zone".tr(),
|
||||
width: 55,
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
@@ -229,7 +230,7 @@ class HomeScreen extends StatelessWidget {
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader(
|
||||
"Please wait..."
|
||||
.tr,
|
||||
.tr(),
|
||||
);
|
||||
|
||||
// ✅ declare it once here!
|
||||
@@ -516,7 +517,7 @@ class HomeScreen extends StatelessWidget {
|
||||
true
|
||||
? 'Искать что угодно'
|
||||
: 'Search the store, item and more...'
|
||||
.tr,
|
||||
.tr(),
|
||||
controller: null,
|
||||
enable: false,
|
||||
backgroundColor:
|
||||
@@ -704,7 +705,7 @@ class HomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"New Arrivals".tr,
|
||||
"New Arrivals".tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
@@ -739,7 +740,7 @@ class HomeScreen extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr,
|
||||
"View all".tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -821,7 +822,7 @@ class HomeScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Highlights for you"
|
||||
.tr,
|
||||
.tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
@@ -851,7 +852,7 @@ class HomeScreen extends StatelessWidget {
|
||||
},
|
||||
child: Text(
|
||||
"View all"
|
||||
.tr,
|
||||
.tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -967,7 +968,7 @@ class HomeScreen extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
"Popular Stores"
|
||||
.tr,
|
||||
.tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -1020,7 +1021,7 @@ class HomeScreen extends StatelessWidget {
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
"All Stores".tr,
|
||||
"All Stores".tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.center,
|
||||
@@ -1208,16 +1209,16 @@ class HomeScreen extends StatelessWidget {
|
||||
isDark
|
||||
? AppThemeData.greyDark100
|
||||
: AppThemeData.grey100,
|
||||
value: controller.selectedOrderTypeValue.value.tr,
|
||||
value: controller.selectedOrderTypeValue.value.tr(),
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
items:
|
||||
<String>['Delivery'.tr, 'TakeAway'.tr].map((
|
||||
<String>['Delivery'.tr(), 'TakeAway'.tr()].map((
|
||||
String value,
|
||||
) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(
|
||||
value.tr,
|
||||
value.tr(),
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontSize: 16,
|
||||
@@ -1242,12 +1243,12 @@ class HomeScreen extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Alert".tr,
|
||||
title: "Alert".tr(),
|
||||
descriptions:
|
||||
"Do you really want to change the delivery option? Your cart will be empty."
|
||||
.tr,
|
||||
positiveString: "Ok".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
.tr(),
|
||||
positiveString: "Ok".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
positiveClick: () async {
|
||||
await Preferences.setString(
|
||||
Preferences.foodDeliveryType,
|
||||
@@ -1287,7 +1288,7 @@ class HomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
name.tr,
|
||||
name.tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.bold,
|
||||
@@ -1300,7 +1301,7 @@ class HomeScreen extends StatelessWidget {
|
||||
onPress!();
|
||||
},
|
||||
child: Text(
|
||||
"View all".tr,
|
||||
"View all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.regular,
|
||||
@@ -1474,7 +1475,7 @@ class PopularRestaurant extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.carRent600,
|
||||
@@ -1779,7 +1780,7 @@ class AllRestaurant extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppThemeData.carRent600,
|
||||
@@ -2076,7 +2077,7 @@ class NewArrival extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2186,7 +2187,7 @@ class AdvertisementHomeCard extends StatelessWidget {
|
||||
final isDark = themeController.isDark.value;
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel = await FireStoreUtils.getVendorById(
|
||||
model.vendorId!,
|
||||
);
|
||||
@@ -2499,7 +2500,7 @@ class OfferView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Upto".tr,
|
||||
"Upto".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2514,7 +2515,7 @@ class OfferView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr : "off".tr}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr() : "off".tr()}",
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -2563,7 +2564,7 @@ class OfferView extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -2649,7 +2650,7 @@ class BannerView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel =
|
||||
await FireStoreUtils.getVendorById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -2661,7 +2662,7 @@ class BannerView extends StatelessWidget {
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ProductModel? productModel =
|
||||
await FireStoreUtils.getProductById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -2681,7 +2682,7 @@ class BannerView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2755,7 +2756,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel =
|
||||
await FireStoreUtils.getVendorById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -2767,7 +2768,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ProductModel? productModel =
|
||||
await FireStoreUtils.getProductById(
|
||||
bannerModel.redirect_id.toString(),
|
||||
@@ -2787,7 +2788,7 @@ class BannerBottomView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2971,7 +2972,7 @@ class StoryView extends StatelessWidget {
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${"Error".tr}: ${snapshot.error}',
|
||||
'${"Error".tr()}: ${snapshot.error}',
|
||||
),
|
||||
);
|
||||
} else if (snapshot.data == null) {
|
||||
@@ -3399,7 +3400,7 @@ class MapView extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Free Delivery"
|
||||
.tr,
|
||||
.tr(),
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
14,
|
||||
|
||||
@@ -23,6 +23,7 @@ import 'package:customer/utils/preferences.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/flutter_svg.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
@@ -69,16 +70,16 @@ class HomeScreenTwo 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,
|
||||
@@ -122,7 +123,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
Get.offAll(const LoginScreen());
|
||||
},
|
||||
child: Text(
|
||||
"Login".tr,
|
||||
"Login".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 12),
|
||||
),
|
||||
@@ -145,7 +146,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
} else {
|
||||
Constant.checkPermission(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
// ✅ declare once for whole method
|
||||
ShippingAddress shippingAddress = ShippingAddress();
|
||||
@@ -255,8 +256,8 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
child: TextFieldWidget(
|
||||
hintText:
|
||||
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true
|
||||
? 'Search the dish, foo and more...'.tr
|
||||
: 'Search the store, item and more...'.tr,
|
||||
? 'Search the dish, foo and more...'.tr()
|
||||
: 'Search the store, item and more...'.tr(),
|
||||
controller: null,
|
||||
enable: false,
|
||||
prefix: Padding(padding: const EdgeInsets.symmetric(horizontal: 16), child: SvgPicture.asset("assets/icons/ic_search.svg")),
|
||||
@@ -299,7 +300,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Highlights for you".tr,
|
||||
"Highlights for you".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -311,7 +312,7 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr,
|
||||
"See all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
),
|
||||
@@ -417,13 +418,13 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
DropdownButton<String>(
|
||||
isDense: false,
|
||||
underline: const SizedBox(),
|
||||
value: controller.selectedOrderTypeValue.value.tr,
|
||||
value: controller.selectedOrderTypeValue.value.tr(),
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
items:
|
||||
<String>['Delivery'.tr, 'TakeAway'.tr].map((String value) {
|
||||
<String>['Delivery'.tr(), 'TakeAway'.tr()].map((String value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value.tr, style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
child: Text(value.tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (value) async {
|
||||
@@ -436,10 +437,10 @@ class HomeScreenTwo extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Alert".tr,
|
||||
descriptions: "Do you really want to change the delivery option? Your cart will be empty.".tr,
|
||||
positiveString: "Ok".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
title: "Alert".tr(),
|
||||
descriptions: "Do you really want to change the delivery option? Your cart will be empty.".tr(),
|
||||
positiveString: "Ok".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
positiveClick: () async {
|
||||
await Preferences.setString(Preferences.foodDeliveryType, value!);
|
||||
controller.selectedOrderTypeValue.value = value;
|
||||
@@ -493,13 +494,13 @@ class CategoryView extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Our Categories".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
Expanded(child: Text("Our Categories".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(const ViewAllCategoryScreen());
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr,
|
||||
"See all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
|
||||
),
|
||||
@@ -507,7 +508,7 @@ class CategoryView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
GradientText(
|
||||
'Best Servings Food'.tr,
|
||||
'Best Servings Food'.tr(),
|
||||
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
|
||||
gradient: LinearGradient(colors: [Color(0xFF3961F1), Color(0xFF11D0EA)]),
|
||||
),
|
||||
@@ -571,7 +572,7 @@ class OfferView extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Expanded(child: Text("Large Discounts".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
Expanded(child: Text("Large Discounts".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(
|
||||
@@ -580,7 +581,7 @@ class OfferView extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr,
|
||||
"See all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
|
||||
),
|
||||
@@ -588,7 +589,7 @@ class OfferView extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
GradientText(
|
||||
'Save Upto 50% Off'.tr,
|
||||
'Save Upto 50% Off'.tr(),
|
||||
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
|
||||
gradient: LinearGradient(colors: [Color(0xFF39F1C5), Color(0xFF97EA11)]),
|
||||
),
|
||||
@@ -642,7 +643,7 @@ class OfferView extends StatelessWidget {
|
||||
const SizedBox(height: 5),
|
||||
RoundedButtonFill(
|
||||
title:
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr : "off".tr}",
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".tr() : "off".tr()}",
|
||||
color: Colors.primaries[Random().nextInt(Colors.primaries.length)],
|
||||
textColor: AppThemeData.grey50,
|
||||
width: 20,
|
||||
@@ -694,13 +695,13 @@ class BannerView extends StatelessWidget {
|
||||
return InkWell(
|
||||
onTap: () async {
|
||||
if (bannerModel.redirect_type == "store") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
VendorModel? vendorModel = await FireStoreUtils.getVendorById(bannerModel.redirect_id.toString());
|
||||
|
||||
ShowToastDialog.closeLoader();
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
} else if (bannerModel.redirect_type == "product") {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
ProductModel? productModel = await FireStoreUtils.getProductById(bannerModel.redirect_id.toString());
|
||||
VendorModel? vendorModel = await FireStoreUtils.getVendorById(productModel!.vendorID.toString());
|
||||
|
||||
@@ -711,7 +712,7 @@ class BannerView extends StatelessWidget {
|
||||
if (await canLaunchUrl(uri)) {
|
||||
await launchUrl(uri);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Could not launch".tr);
|
||||
ShowToastDialog.showToast("Could not launch".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -746,9 +747,9 @@ class StoryView extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(children: [Expanded(child: Text("Stories".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 18)))]),
|
||||
Row(children: [Expanded(child: Text("Stories".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontSize: 18)))]),
|
||||
GradientText(
|
||||
'Best Food Stories Ever'.tr,
|
||||
'Best Food Stories Ever'.tr(),
|
||||
style: TextStyle(fontSize: 24, fontFamily: 'Inter Tight', fontWeight: FontWeight.w800),
|
||||
gradient: LinearGradient(colors: [Color(0xFFF1C839), Color(0xFFEA1111)]),
|
||||
),
|
||||
@@ -787,7 +788,7 @@ class StoryView extends StatelessWidget {
|
||||
return Constant.loader();
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('${"Error".tr}: ${snapshot.error}'));
|
||||
return Center(child: Text('${"Error".tr()}: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
} else {
|
||||
@@ -814,7 +815,7 @@ class StoryView extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_star.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum!.toStringAsFixed(0))} ${'reviews'.tr}",
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum!.toStringAsFixed(0))} ${'reviews'.tr()}",
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(color: AppThemeData.warning300, fontSize: 10, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),
|
||||
@@ -869,13 +870,13 @@ class RestaurantView extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(child: Text("Best Restaurants".tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
Expanded(child: Text("Best Restaurants".tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 18))),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.to(const RestaurantListScreen(), arguments: {"vendorList": controller.allNearestRestaurant, "title": "Best Restaurants"});
|
||||
},
|
||||
child: Text(
|
||||
"See all".tr,
|
||||
"See all".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontSize: 14),
|
||||
),
|
||||
@@ -938,7 +939,7 @@ class RestaurantView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"Upto".tr,
|
||||
"Upto".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -949,7 +950,7 @@ class RestaurantView extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
discountAmountTempList.reduce(min).toString() + "% OFF".tr,
|
||||
discountAmountTempList.reduce(min).toString() + "% OFF".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -1001,7 +1002,7 @@ class RestaurantView extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg", width: 18),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.medium,
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/models/favourite_model.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -122,7 +123,7 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:customer/widget/story_view/controller/story_controller.dart';
|
||||
import 'package:customer/widget/story_view/utils.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';
|
||||
@@ -103,7 +104,7 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
return SizedBox();
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('${"Error".tr}: ${snapshot.error}'));
|
||||
return Center(child: Text('${"Error".tr()}: ${snapshot.error}'));
|
||||
return Center(child: Text('Error: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
@@ -135,7 +136,7 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
SvgPicture.asset("assets/icons/ic_star.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum.toString())} ${'reviews'.tr}",
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum.toString())} ${'reviews'.tr()}",
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(color: AppThemeData.warning300, fontSize: 12, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/view_all_category_controller.dart';
|
||||
import 'package:customer/models/vendor_category_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
@@ -24,7 +25,7 @@ class ViewAllCategoryScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Categories".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
title: Text("Categories".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/controllers/live_tracking_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_map/flutter_map.dart' as flutterMap;
|
||||
import 'package:get/get.dart';
|
||||
@@ -24,7 +25,7 @@ class LiveTrackingScreen extends StatelessWidget {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, title: Text("Live Tracking".tr), centerTitle: false),
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, title: Text("Live Tracking".tr()), centerTitle: false),
|
||||
body:
|
||||
Constant.selectedMapType == 'osm'
|
||||
? flutterMap.FlutterMap(
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/network_image_widget.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';
|
||||
@@ -37,7 +38,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Order Details".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Order Details".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
@@ -56,7 +57,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"${'Order'.tr} ${Constant.orderId(orderId: controller.orderModel.value.id.toString())}".tr,
|
||||
"${'Order'.tr()} ${Constant.orderId(orderId: controller.orderModel.value.id.toString())}".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 18, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -64,7 +65,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
title: controller.orderModel.value.status.toString().tr,
|
||||
title: controller.orderModel.value.status.toString().tr(),
|
||||
color: Constant.statusColor(status: controller.orderModel.value.status.toString()),
|
||||
width: 32,
|
||||
height: 4.5,
|
||||
@@ -125,7 +126,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
? const SizedBox()
|
||||
: InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.vendor!.author.toString());
|
||||
@@ -236,7 +237,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
? const SizedBox()
|
||||
: InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.vendor!.author.toString());
|
||||
@@ -314,7 +315,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Order Delivered.".tr,
|
||||
"Order Delivered.".tr(),
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.grey100 : AppThemeData.grey800,
|
||||
@@ -333,8 +334,8 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
const SizedBox(width: 5),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"${'Your Order has been Preparing and assign to the driver'.tr}\n${'Preparation Time'.tr} ${controller.orderModel.value.estimatedTimeToPrepare}"
|
||||
.tr,
|
||||
"${'Your Order has been Preparing and assign to the driver'.tr()}\n${'Preparation Time'.tr()} ${controller.orderModel.value.estimatedTimeToPrepare}"
|
||||
.tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.warning400 : AppThemeData.warning400,
|
||||
@@ -404,7 +405,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
const SizedBox(width: 10),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
|
||||
UserModel? customer = await FireStoreUtils.getUserProfile(controller.orderModel.value.authorID.toString());
|
||||
UserModel? restaurantUser = await FireStoreUtils.getUserProfile(controller.orderModel.value.driverID.toString());
|
||||
@@ -450,7 +451,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
Text(
|
||||
"Your Order".tr,
|
||||
"Your Order".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -555,7 +556,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: RoundedButtonFill(
|
||||
title: "Rate us".tr,
|
||||
title: "Rate us".tr(),
|
||||
height: 3.8,
|
||||
width: 20,
|
||||
color: isDark ? AppThemeData.warning300 : AppThemeData.warning300,
|
||||
@@ -578,7 +579,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Variants".tr,
|
||||
"Variants".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -616,7 +617,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Addons".tr,
|
||||
"Addons".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -670,7 +671,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// "Delivery Man".tr,
|
||||
// "Delivery Man".tr(),
|
||||
// textAlign: TextAlign.start,
|
||||
// style: TextStyle(
|
||||
// fontFamily: AppThemeData.semiBold,
|
||||
@@ -689,7 +690,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
// ],
|
||||
// ),
|
||||
Text(
|
||||
"Bill Details".tr,
|
||||
"Bill Details".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -706,7 +707,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Item totals".tr,
|
||||
"Item totals".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -726,13 +727,13 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Delivery Fee".tr,
|
||||
"Delivery Fee".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
),
|
||||
(controller.orderModel.value.vendor?.isSelfDelivery == true)
|
||||
? Text('Free Delivery'.tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16))
|
||||
? Text('Free Delivery'.tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.regular, color: AppThemeData.success400, fontSize: 16))
|
||||
: Text(
|
||||
Constant.amountShow(
|
||||
amount:
|
||||
@@ -753,7 +754,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Coupon Discount".tr,
|
||||
"Coupon Discount".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -774,7 +775,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Special Discount".tr,
|
||||
"Special Discount".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -800,7 +801,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Delivery Tips".tr,
|
||||
"Delivery Tips".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -860,7 +861,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"To Pay".tr,
|
||||
"To Pay".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -878,7 +879,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 14),
|
||||
Text(
|
||||
"Order Details".tr,
|
||||
"Order Details".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -895,17 +896,17 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Delivery type".tr,
|
||||
"Delivery type".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
controller.orderModel.value.takeAway == true
|
||||
? "TakeAway".tr
|
||||
? "TakeAway".tr()
|
||||
: controller.orderModel.value.scheduleTime == null
|
||||
? "Standard".tr
|
||||
: "Schedule".tr,
|
||||
? "Standard".tr()
|
||||
: "Schedule".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -926,7 +927,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Payment Method".tr,
|
||||
"Payment Method".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -944,7 +945,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Date and Time".tr,
|
||||
"Date and Time".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -965,7 +966,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Phone Number".tr,
|
||||
"Phone Number".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -991,7 +992,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Remarks".tr,
|
||||
"Remarks".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -1026,7 +1027,7 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
child:
|
||||
controller.orderModel.value.status == Constant.orderShipped || controller.orderModel.value.status == Constant.orderInTransit
|
||||
? RoundedButtonFill(
|
||||
title: "Track Order".tr,
|
||||
title: "Track Order".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.warning300,
|
||||
textColor: AppThemeData.grey900,
|
||||
@@ -1035,14 +1036,14 @@ class OrderDetailsScreen extends StatelessWidget {
|
||||
},
|
||||
)
|
||||
: RoundedButtonFill(
|
||||
title: "Reorder".tr,
|
||||
title: "Reorder".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
for (var element in controller.orderModel.value.products!) {
|
||||
controller.addToCart(cartProductModel: element);
|
||||
ShowToastDialog.showToast("Item Added In a cart".tr);
|
||||
ShowToastDialog.showToast("Item Added In a cart".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
@@ -40,16 +41,16 @@ class OrderScreen 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,11 +75,11 @@ class OrderScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"My Order".tr,
|
||||
"My Order".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Keep track your delivered, In Progress and Rejected item all in just one place.".tr,
|
||||
"Keep track your delivered, In Progress and Rejected item all in just one place.".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
@@ -109,11 +110,11 @@ class OrderScreen extends StatelessWidget {
|
||||
dividerColor: Colors.transparent,
|
||||
indicatorSize: TabBarIndicatorSize.tab,
|
||||
tabs: [
|
||||
Padding(padding: const EdgeInsets.symmetric(horizontal: 18), child: Tab(text: 'All'.tr)),
|
||||
Tab(text: 'In Progress'.tr),
|
||||
Tab(text: 'Delivered'.tr),
|
||||
Tab(text: 'Cancelled'.tr),
|
||||
Tab(text: 'Rejected'.tr),
|
||||
Padding(padding: const EdgeInsets.symmetric(horizontal: 18), child: Tab(text: 'All'.tr())),
|
||||
Tab(text: 'In Progress'.tr()),
|
||||
Tab(text: 'Delivered'.tr()),
|
||||
Tab(text: 'Cancelled'.tr()),
|
||||
Tab(text: 'Rejected'.tr()),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -122,7 +123,7 @@ class OrderScreen extends StatelessWidget {
|
||||
child: TabBarView(
|
||||
children: [
|
||||
controller.allList.isEmpty
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr)
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getOrder(),
|
||||
child: ListView.builder(
|
||||
@@ -136,7 +137,7 @@ class OrderScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
controller.inProgressList.isEmpty
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr)
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getOrder(),
|
||||
child: ListView.builder(
|
||||
@@ -150,7 +151,7 @@ class OrderScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
controller.deliveredList.isEmpty
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr)
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getOrder(),
|
||||
child: ListView.builder(
|
||||
@@ -164,7 +165,7 @@ class OrderScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
controller.cancelledList.isEmpty
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr)
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getOrder(),
|
||||
child: ListView.builder(
|
||||
@@ -178,7 +179,7 @@ class OrderScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
controller.rejectedList.isEmpty
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr)
|
||||
? Constant.showEmptyView(message: "Order Not Found".tr())
|
||||
: RefreshIndicator(
|
||||
onRefresh: () => controller.getOrder(),
|
||||
child: ListView.builder(
|
||||
@@ -296,11 +297,11 @@ class OrderScreen extends StatelessWidget {
|
||||
onTap: () {
|
||||
for (var element in orderModel.products!) {
|
||||
controller.addToCart(cartProductModel: element);
|
||||
ShowToastDialog.showToast("Item Added In a cart".tr);
|
||||
ShowToastDialog.showToast("Item Added In a cart".tr());
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
"Reorder".tr,
|
||||
"Reorder".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
|
||||
),
|
||||
@@ -313,7 +314,7 @@ class OrderScreen extends StatelessWidget {
|
||||
Get.to(const LiveTrackingScreen(), arguments: {"orderModel": orderModel});
|
||||
},
|
||||
child: Text(
|
||||
"Track Order".tr,
|
||||
"Track Order".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
|
||||
),
|
||||
@@ -327,7 +328,7 @@ class OrderScreen extends StatelessWidget {
|
||||
// Get.off(const OrderPlacingScreen(), arguments: {"orderModel": orderModel});
|
||||
},
|
||||
child: Text(
|
||||
"View Details".tr,
|
||||
"View Details".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600, fontSize: 16),
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/screen_ui/on_demand_service/worker_inbox_screen.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/custom_dialog_box.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:in_app_review/in_app_review.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
@@ -51,16 +52,16 @@ class ProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"My Profile".tr,
|
||||
"My Profile".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Manage your personal information, preferences, and settings all in one place.".tr,
|
||||
"Manage your personal information, preferences, and settings all in one place.".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"General Information".tr,
|
||||
"General Information".tr(),
|
||||
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -73,18 +74,18 @@ class ProfileScreen extends StatelessWidget {
|
||||
children: [
|
||||
Constant.userModel == null
|
||||
? const SizedBox()
|
||||
: cardDecoration(isDark, controller, "assets/images/ic_profile.svg", "Profile Information".tr, () {
|
||||
: cardDecoration(isDark, controller, "assets/images/ic_profile.svg", "Profile Information".tr(), () {
|
||||
Get.to(const EditProfileScreen());
|
||||
}),
|
||||
if (Constant.sectionConstantModel!.dineInActive == true)
|
||||
cardDecoration(isDark, controller, "assets/images/ic_dinin.svg", "Dine-In".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/images/ic_dinin.svg", "Dine-In".tr(), () {
|
||||
Get.to(const DineInScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/images/ic_gift.svg", "Gift Card".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/images/ic_gift.svg", "Gift Card".tr(), () {
|
||||
Get.to(const GiftCardScreen());
|
||||
}),
|
||||
if (Constant.isCashbackActive == true)
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_cashback_Offer.svg", "Cashback Offers".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_cashback_Offer.svg", "Cashback Offers".tr(), () {
|
||||
Get.to(const CashbackOffersListScreen());
|
||||
}),
|
||||
],
|
||||
@@ -97,7 +98,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Bookings Information".tr,
|
||||
"Bookings Information".tr(),
|
||||
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -108,7 +109,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 5),
|
||||
child: Column(
|
||||
children: [
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_dinin_order.svg", "Dine-In Booking".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_dinin_order.svg", "Dine-In Booking".tr(), () {
|
||||
Get.to(const DineInBookingScreen());
|
||||
}),
|
||||
],
|
||||
@@ -120,7 +121,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Preferences".tr,
|
||||
"Preferences".tr(),
|
||||
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -131,17 +132,17 @@ class ProfileScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_change_language.svg", "Change Language".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_change_language.svg", "Change Language".tr(), () {
|
||||
Get.to(const ChangeLanguageScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_light_dark.svg", "Dark Mode".tr, () {}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_light_dark.svg", "Dark Mode".tr(), () {}),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Social".tr,
|
||||
"Social".tr(),
|
||||
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -154,16 +155,16 @@ class ProfileScreen extends StatelessWidget {
|
||||
children: [
|
||||
Constant.userModel == null
|
||||
? const SizedBox()
|
||||
: cardDecoration(isDark, controller, "assets/icons/ic_refer.svg", "Refer a Friend".tr, () {
|
||||
: cardDecoration(isDark, controller, "assets/icons/ic_refer.svg", "Refer a Friend".tr(), () {
|
||||
Get.to(const ReferFriendScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_share.svg", "Share app".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_share.svg", "Share app".tr(), () {
|
||||
Share.share(
|
||||
'${'Check out Foodie, your ultimate food delivery application!'.tr} \n\n${'Google Play:'.tr} ${Constant.googlePlayLink} \n\n${'App Store:'.tr} ${Constant.appStoreLink}',
|
||||
subject: 'Look what I made!'.tr,
|
||||
'${'Check out Foodie, your ultimate food delivery application!'.tr()} \n\n${'Google Play:'.tr()} ${Constant.googlePlayLink} \n\n${'App Store:'.tr()} ${Constant.appStoreLink}',
|
||||
subject: 'Look what I made!'.tr(),
|
||||
);
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_rate.svg", "Rate the app".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_rate.svg", "Rate the app".tr(), () {
|
||||
final InAppReview inAppReview = InAppReview.instance;
|
||||
inAppReview.requestReview();
|
||||
}),
|
||||
@@ -178,7 +179,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Communication".tr,
|
||||
"Communication".tr(),
|
||||
style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -189,16 +190,16 @@ class ProfileScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Store Inbox".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Store Inbox".tr(), () {
|
||||
Get.to(const RestaurantInboxScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Driver Inbox".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Driver Inbox".tr(), () {
|
||||
Get.to(const DriverInboxScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Provider Inbox".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_chat.svg", "Provider Inbox".tr(), () {
|
||||
Get.to(const ProviderInboxScreen());
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Worker Inbox".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_restaurant_driver.svg", "Worker Inbox".tr(), () {
|
||||
Get.to(const WorkerInboxScreen());
|
||||
}),
|
||||
],
|
||||
@@ -208,7 +209,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
],
|
||||
),
|
||||
Text("Legal".tr, style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
|
||||
Text("Legal".tr(), style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500)),
|
||||
const SizedBox(height: 10),
|
||||
Container(
|
||||
width: Responsive.width(100, context),
|
||||
@@ -217,10 +218,10 @@ class ProfileScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
|
||||
child: Column(
|
||||
children: [
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_privacy_policy.svg", "Privacy Policy".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_privacy_policy.svg", "Privacy Policy".tr(), () {
|
||||
Get.to(const TermsAndConditionScreen(type: "privacy"));
|
||||
}),
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_tearm_condition.svg", "Terms and Conditions".tr, () {
|
||||
cardDecoration(isDark, controller, "assets/icons/ic_tearm_condition.svg", "Terms and Conditions".tr(), () {
|
||||
Get.to(const TermsAndConditionScreen(type: "termAndCondition"));
|
||||
}),
|
||||
],
|
||||
@@ -237,18 +238,18 @@ class ProfileScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Constant.userModel == null
|
||||
? cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log In".tr, () {
|
||||
? cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log In".tr(), () {
|
||||
Get.offAll(const LoginScreen());
|
||||
})
|
||||
: cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log out".tr, () {
|
||||
: cardDecoration(isDark, controller, "assets/icons/ic_logout.svg", "Log out".tr(), () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Log out".tr,
|
||||
descriptions: "Are you sure you want to log out? You will need to enter your credentials to log back in.".tr,
|
||||
positiveString: "Log out".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
title: "Log out".tr(),
|
||||
descriptions: "Are you sure you want to log out? You will need to enter your credentials to log back in.".tr(),
|
||||
positiveString: "Log out".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
positiveClick: () async {
|
||||
Constant.userModel!.fcmToken = "";
|
||||
await FireStoreUtils.updateUser(Constant.userModel!);
|
||||
@@ -279,20 +280,20 @@ class ProfileScreen extends StatelessWidget {
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return CustomDialogBox(
|
||||
title: "Delete Account".tr,
|
||||
descriptions: "Are you sure you want to delete your account? This action is irreversible and will permanently remove all your data.".tr,
|
||||
positiveString: "Delete".tr,
|
||||
negativeString: "Cancel".tr,
|
||||
title: "Delete Account".tr(),
|
||||
descriptions: "Are you sure you want to delete your account? This action is irreversible and will permanently remove all your data.".tr(),
|
||||
positiveString: "Delete".tr(),
|
||||
negativeString: "Cancel".tr(),
|
||||
positiveClick: () async {
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
await controller.deleteUserFromServer();
|
||||
await FireStoreUtils.deleteUser().then((value) {
|
||||
ShowToastDialog.closeLoader();
|
||||
if (value == true) {
|
||||
ShowToastDialog.showToast("Account deleted successfully".tr);
|
||||
ShowToastDialog.showToast("Account deleted successfully".tr());
|
||||
Get.offAll(const LoginScreen());
|
||||
} else {
|
||||
ShowToastDialog.showToast("Contact Administrator".tr);
|
||||
ShowToastDialog.showToast("Contact Administrator".tr());
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -311,7 +312,7 @@ class ProfileScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_delete.svg"),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
"Delete Account".tr,
|
||||
"Delete Account".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.danger300 : AppThemeData.danger300),
|
||||
),
|
||||
@@ -347,25 +348,25 @@ class ProfileScreen extends StatelessWidget {
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset(image, colorFilter: title == "Log In".tr || title == "Cashbacks".tr ? const ColorFilter.mode(AppThemeData.success500, BlendMode.srcIn) : null, height: 24, width: 24),
|
||||
SvgPicture.asset(image, colorFilter: title == "Log In".tr() || title == "Cashbacks".tr() ? const ColorFilter.mode(AppThemeData.success500, BlendMode.srcIn) : null, height: 24, width: 24),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Text(
|
||||
title.tr,
|
||||
title.tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontSize: 16,
|
||||
color:
|
||||
title == "Log out".tr
|
||||
title == "Log out".tr()
|
||||
? AppThemeData.danger300
|
||||
: title == "Log In".tr
|
||||
: title == "Log In".tr()
|
||||
? AppThemeData.success500
|
||||
: (isDark ? AppThemeData.grey100 : AppThemeData.grey800),
|
||||
),
|
||||
),
|
||||
),
|
||||
title == "Dark Mode".tr
|
||||
title == "Dark Mode".tr()
|
||||
? Transform.scale(
|
||||
scale: 0.8,
|
||||
child: Obx(() => CupertinoSwitch(value: controller.isDarkModeSwitch.value, activeTrackColor: AppThemeData.primary300, onChanged: controller.toggleDarkMode)),
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -31,7 +32,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Rate the item".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Rate the item".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
@@ -49,9 +50,9 @@ class RateProductScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text("Rate for".tr, style: TextStyle(color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.medium)),
|
||||
Text("Rate for".tr(), style: TextStyle(color: isDark ? AppThemeData.grey400 : AppThemeData.grey500, fontSize: 16, fontFamily: AppThemeData.medium)),
|
||||
Text(
|
||||
"${controller.productModel.value.name}".tr,
|
||||
"${controller.productModel.value.name}".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontSize: 18, fontFamily: AppThemeData.semiBold),
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
@@ -123,14 +124,14 @@ class RateProductScreen extends StatelessWidget {
|
||||
SvgPicture.asset('assets/icons/ic_folder.svg'),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Choose a image and upload here".tr,
|
||||
"Choose a image and upload here".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.medium, fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Text("JPEG, PNG".tr, style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular)),
|
||||
Text("JPEG, PNG".tr(), style: TextStyle(fontSize: 12, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular)),
|
||||
const SizedBox(height: 10),
|
||||
RoundedButtonFill(
|
||||
title: "Brows Image".tr,
|
||||
title: "Brows Image".tr(),
|
||||
color: AppThemeData.primary50,
|
||||
width: 30,
|
||||
height: 5,
|
||||
@@ -216,7 +217,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
enabledBorder: InputBorder.none,
|
||||
errorBorder: InputBorder.none,
|
||||
border: InputBorder.none,
|
||||
hintText: "Type comment".tr,
|
||||
hintText: "Type comment".tr(),
|
||||
hintStyle: TextStyle(fontSize: 14, color: isDark ? AppThemeData.grey600 : AppThemeData.grey400, fontFamily: AppThemeData.regular),
|
||||
),
|
||||
),
|
||||
@@ -235,7 +236,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "Submit Review".tr,
|
||||
title: "Submit Review".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
@@ -265,7 +266,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 15),
|
||||
child: Text("Please Select".tr, style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.bold, fontSize: 16)),
|
||||
child: Text("Please Select".tr(), style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.bold, fontSize: 16)),
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -277,7 +278,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(onPressed: () => controller.pickFile(source: ImageSource.camera), icon: const Icon(Icons.camera_alt, size: 32)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Camera".tr)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Camera".tr())),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -288,7 +289,7 @@ class RateProductScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
IconButton(onPressed: () => controller.pickFile(source: ImageSource.gallery), icon: const Icon(Icons.photo_library_sharp, size: 32)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Gallery".tr)),
|
||||
Padding(padding: const EdgeInsets.only(top: 3), child: Text("Gallery".tr())),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:customer/controllers/refer_friend_controller.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -51,17 +52,17 @@ class ReferFriendScreen extends StatelessWidget {
|
||||
Center(child: SvgPicture.asset("assets/images/referal_top.svg")),
|
||||
const SizedBox(height: 10),
|
||||
Text(
|
||||
"Refer your friend and earn".tr,
|
||||
"Refer your friend and earn".tr(),
|
||||
style: TextStyle(fontSize: 22, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
"${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'Each🎉'.tr}",
|
||||
"${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'Each🎉'.tr()}",
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
const SizedBox(height: 32),
|
||||
Text(
|
||||
"Invite Friends & Businesses".tr,
|
||||
"Invite Friends & Businesses".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.ecommerce100 : AppThemeData.ecommerceDark100,
|
||||
@@ -71,8 +72,8 @@ class ReferFriendScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
"${'Invite your friends to sign up with Foodie using your code, and you’ll earn'.tr} ${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'after their Success the first order! 💸🍔'.tr}"
|
||||
.tr,
|
||||
"${'Invite your friends to sign up with Foodie using your code, and you’ll earn'.tr()} ${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount)} ${'after their Success the first order! 💸🍔'.tr()}"
|
||||
.tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w500),
|
||||
),
|
||||
@@ -101,7 +102,7 @@ class ReferFriendScreen extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: controller.referralModel.value.referralCode.toString()));
|
||||
ShowToastDialog.showToast("Copied".tr);
|
||||
ShowToastDialog.showToast("Copied".tr());
|
||||
},
|
||||
child: const Icon(Icons.copy, color: AppThemeData.ecommerce100),
|
||||
),
|
||||
@@ -117,7 +118,7 @@ class ReferFriendScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30),
|
||||
child: Text(
|
||||
"or".tr,
|
||||
"or".tr(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.ecommerce100 : AppThemeData.ecommerceDark100,
|
||||
@@ -132,13 +133,13 @@ class ReferFriendScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
RoundedButtonFill(
|
||||
title: "Share Code".tr,
|
||||
title: "Share Code".tr(),
|
||||
width: 55,
|
||||
color: AppThemeData.ecommerce300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
await Share.share(
|
||||
"${"Hey there, thanks for choosing Foodie. Hope you love our product. If you do, share it with your friends using code".tr} ${controller.referralModel.value.referralCode.toString()} ${"and get".tr}${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount.toString())} ${"when order completed".tr}",
|
||||
"${"Hey there, thanks for choosing Foodie. Hope you love our product. If you do, share it with your friends using code".tr()} ${controller.referralModel.value.referralCode.toString()} ${"and get".tr()}${Constant.amountShow(amount: Constant.sectionConstantModel!.referralAmount.toString())} ${"when order completed".tr()}",
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -13,6 +13,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
@@ -51,8 +52,8 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('${cartItem.length} ${"items".tr}', style: TextStyle(fontFamily: AppThemeData.medium, color: AppThemeData.grey50, fontSize: 16)),
|
||||
Text('View Cart'.tr, style: TextStyle(fontFamily: AppThemeData.semiBold, color: AppThemeData.grey50, fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
Text('${cartItem.length} ${"items".tr()}', style: TextStyle(fontFamily: AppThemeData.medium, color: AppThemeData.grey50, fontSize: 16)),
|
||||
Text('View Cart'.tr(), style: TextStyle(fontFamily: AppThemeData.semiBold, color: AppThemeData.grey50, fontSize: 16, fontWeight: FontWeight.bold)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -89,7 +90,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text("Free Delivery".tr, style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600)),
|
||||
Text("Free Delivery".tr(), style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -288,7 +289,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
Get.to(const ReviewListScreen(), arguments: {"vendorModel": controller.vendorModel.value});
|
||||
},
|
||||
child: Text(
|
||||
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr}",
|
||||
"${controller.vendorModel.value.reviewsCount} ${'Ratings'.tr()}",
|
||||
style: TextStyle(decoration: TextDecoration.underline, color: isDark ? AppThemeData.grey200 : AppThemeData.grey700, fontFamily: AppThemeData.regular),
|
||||
),
|
||||
),
|
||||
@@ -301,7 +302,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
: Row(
|
||||
children: [
|
||||
Text(
|
||||
controller.isOpen.value ? "Open".tr : "Close".tr,
|
||||
controller.isOpen.value ? "Open".tr() : "Close".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -316,13 +317,13 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (controller.vendorModel.value.workingHours!.isEmpty) {
|
||||
ShowToastDialog.showToast("Timing is not added by store".tr);
|
||||
ShowToastDialog.showToast("Timing is not added by store".tr());
|
||||
} else {
|
||||
timeShowBottomSheet(context, controller);
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
"View Timings".tr,
|
||||
"View Timings".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -344,7 +345,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Also applicable on table booking".tr,
|
||||
"Also applicable on table booking".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -383,7 +384,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Table Booking".tr,
|
||||
"Table Booking".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
@@ -392,7 +393,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
"Quick Conformations".tr,
|
||||
"Quick Conformations".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey500,
|
||||
@@ -418,7 +419,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
children: [
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Additional Offers".tr,
|
||||
"Additional Offers".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -435,7 +436,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
"Menu".tr,
|
||||
"Menu".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
@@ -449,7 +450,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
const SizedBox(height: 10),
|
||||
TextFieldWidget(
|
||||
controller: controller.searchEditingController.value,
|
||||
hintText: 'Search the item and more...'.tr,
|
||||
hintText: 'Search the item and more...'.tr(),
|
||||
onchange: (value) {
|
||||
controller.searchProduct(value);
|
||||
},
|
||||
@@ -492,7 +493,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_veg.svg", height: 20, width: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Veg'.tr,
|
||||
'Veg'.tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
@@ -532,7 +533,7 @@ class RestaurantDetailsScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_nonveg.svg", height: 20, width: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'Non Veg'.tr,
|
||||
'Non Veg'.tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
@@ -805,7 +806,7 @@ class CouponListView extends StatelessWidget {
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: offerModel.code.toString())).then((value) {
|
||||
ShowToastDialog.showToast("Copied".tr);
|
||||
ShowToastDialog.showToast("Copied".tr());
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
@@ -921,7 +922,7 @@ class ProductListView extends StatelessWidget {
|
||||
productModel.nonveg == true ? SvgPicture.asset("assets/icons/ic_nonveg.svg") : SvgPicture.asset("assets/icons/ic_veg.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
|
||||
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
|
||||
style: TextStyle(
|
||||
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -995,7 +996,7 @@ class ProductListView extends StatelessWidget {
|
||||
Icon(Icons.info, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, size: 18),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
"Info".tr,
|
||||
"Info".tr(),
|
||||
maxLines: 2,
|
||||
style: TextStyle(
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -1064,7 +1065,7 @@ class ProductListView extends StatelessWidget {
|
||||
child:
|
||||
selectedVariants.isNotEmpty || (productModel.addOnsTitle != null && productModel.addOnsTitle!.isNotEmpty)
|
||||
? RoundedButtonFill(
|
||||
title: "Add".tr,
|
||||
title: "Add".tr(),
|
||||
width: 10,
|
||||
height: 4,
|
||||
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
@@ -1177,7 +1178,7 @@ class ProductListView extends StatelessWidget {
|
||||
quantity: cartItem.where((p0) => p0.id == productModel.id).first.quantity! + 1,
|
||||
);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
},
|
||||
child: Icon(Icons.add, color: isDark ? AppThemeData.grey50 : AppThemeData.greyDark50),
|
||||
@@ -1186,7 +1187,7 @@ class ProductListView extends StatelessWidget {
|
||||
),
|
||||
)
|
||||
: RoundedButtonFill(
|
||||
title: "Add".tr,
|
||||
title: "Add".tr(),
|
||||
width: 10,
|
||||
height: 4,
|
||||
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
@@ -1195,7 +1196,7 @@ class ProductListView extends StatelessWidget {
|
||||
if (1 <= (productModel.quantity ?? 0) || (productModel.quantity ?? 0) == -1) {
|
||||
controller.addToCart(productModel: productModel, price: price, discountPrice: disPrice, isIncrement: true, quantity: 1);
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -1257,7 +1258,7 @@ class ProductListView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Product Information's".tr,
|
||||
"Product Information's".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.bold, fontWeight: FontWeight.w700, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -1278,7 +1279,7 @@ class ProductListView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gram".tr,
|
||||
"Gram".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -1300,7 +1301,7 @@ class ProductListView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Calories".tr,
|
||||
"Calories".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -1322,7 +1323,7 @@ class ProductListView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Proteins".tr,
|
||||
"Proteins".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -1344,7 +1345,7 @@ class ProductListView extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Fats".tr,
|
||||
"Fats".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.regular, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600, fontSize: 16),
|
||||
),
|
||||
@@ -1365,7 +1366,7 @@ class ProductListView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Specification".tr,
|
||||
"Specification".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w700, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -1408,7 +1409,7 @@ class ProductListView extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Brand".tr,
|
||||
"Brand".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontWeight: FontWeight.w700, fontFamily: AppThemeData.bold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 16),
|
||||
),
|
||||
@@ -1424,7 +1425,7 @@ class ProductListView extends StatelessWidget {
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 20),
|
||||
RoundedButtonFill(
|
||||
title: "Back".tr,
|
||||
title: "Back".tr(),
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
onPress: () async {
|
||||
@@ -1588,7 +1589,7 @@ class ProductDetailsView extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
child: Text(
|
||||
"Required • Select any 1 option".tr,
|
||||
"Required • Select any 1 option".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -1700,7 +1701,7 @@ class ProductDetailsView extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Text(
|
||||
"Addons".tr,
|
||||
"Addons".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
@@ -1830,7 +1831,7 @@ class ProductDetailsView extends StatelessWidget {
|
||||
controller.quantity.value += 1;
|
||||
controller.update();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
} else {
|
||||
int totalQuantity = int.parse(
|
||||
@@ -1840,7 +1841,7 @@ class ProductDetailsView extends StatelessWidget {
|
||||
controller.quantity.value += 1;
|
||||
controller.update();
|
||||
} else {
|
||||
ShowToastDialog.showToast("Out of stock".tr);
|
||||
ShowToastDialog.showToast("Out of stock".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -1854,7 +1855,7 @@ class ProductDetailsView extends StatelessWidget {
|
||||
Expanded(
|
||||
flex: 2,
|
||||
child: RoundedButtonFill(
|
||||
title: "${'Add item'.tr} ${Constant.amountShow(amount: controller.calculatePrice(productModel))}".tr,
|
||||
title: "${'Add item'.tr()} ${Constant.amountShow(amount: controller.calculatePrice(productModel))}".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/models/rating_model.dart';
|
||||
import 'package:customer/models/review_attribute_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
@@ -31,13 +32,13 @@ class ReviewListScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Reviews".tr, textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
title: Text("Reviews".tr(), textAlign: TextAlign.start, style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900)),
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
: controller.ratingList.isEmpty
|
||||
? Constant.showEmptyView(message: "No Review found".tr)
|
||||
? Constant.showEmptyView(message: "No Review found".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: ListView.builder(
|
||||
@@ -72,7 +73,7 @@ class ReviewListScreen extends StatelessWidget {
|
||||
} else if (snapshot.data != null) {
|
||||
ProductModel model = ProductModel.fromJson(snapshot.data!.data()!);
|
||||
return Text(
|
||||
'${'Rate for'.tr} - ${model.name ?? ''}',
|
||||
'${'Rate for'.tr()} - ${model.name ?? ''}',
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 14, fontFamily: AppThemeData.semiBold),
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:customer/controllers/scan_qr_code_controller.dart';
|
||||
import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:qr_code_dart_scan/qr_code_dart_scan.dart';
|
||||
@@ -24,7 +25,7 @@ class ScanQrCodeScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
title: Text("Scan QR Code".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
title: Text("Scan QR Code".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
body: QRCodeDartScanView(
|
||||
// enable scan invert qr code ( default = false)
|
||||
@@ -32,11 +33,11 @@ class ScanQrCodeScreen extends StatelessWidget {
|
||||
// if TypeScan.takePicture will try decode when click to take a picture(default TypeScan.live)
|
||||
onCapture: (Result result) {
|
||||
Get.back();
|
||||
ShowToastDialog.showLoader("Please wait...".tr);
|
||||
ShowToastDialog.showLoader("Please wait...".tr());
|
||||
if (controller.allNearestRestaurant.isNotEmpty) {
|
||||
if (controller.allNearestRestaurant.where((vendor) => vendor.id == result.text).isEmpty) {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Store is not available".tr);
|
||||
ShowToastDialog.showToast("Store is not available".tr());
|
||||
return;
|
||||
}
|
||||
VendorModel storeModel = controller.allNearestRestaurant.firstWhere((vendor) => vendor.id == result.text);
|
||||
@@ -45,7 +46,7 @@ class ScanQrCodeScreen extends StatelessWidget {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": storeModel});
|
||||
} else {
|
||||
Get.back();
|
||||
ShowToastDialog.showToast("Store is not available".tr);
|
||||
ShowToastDialog.showToast("Store is not available".tr());
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'package:customer/models/vendor_model.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/responsive.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -31,7 +32,7 @@ class SearchScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? "Find your favorite products and nearby stores" : "Search Item & Store".tr,
|
||||
Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? "Find your favorite products and nearby stores" : "Search Item & Store".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -40,7 +41,7 @@ class SearchScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFieldWidget(
|
||||
hintText: Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? 'Find your favorite products and nearby stores'.tr : 'Search the store and item'.tr,
|
||||
hintText: Constant.sectionConstantModel?.name?.toLowerCase().contains('restaurants') == true ? 'Find your favorite products and nearby stores'.tr() : 'Search the store and item'.tr(),
|
||||
prefix: Padding(padding: const EdgeInsets.symmetric(horizontal: 16), child: SvgPicture.asset("assets/icons/ic_search.svg")),
|
||||
controller: null,
|
||||
onchange: (value) {
|
||||
@@ -65,7 +66,7 @@ class SearchScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Store".tr,
|
||||
"Store".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -131,7 +132,7 @@ class SearchScreen extends StatelessWidget {
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"Free Delivery".tr,
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(fontSize: 14, color: AppThemeData.success300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
@@ -236,7 +237,7 @@ class SearchScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Items".tr,
|
||||
"Items".tr(),
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
@@ -290,7 +291,7 @@ class SearchScreen extends StatelessWidget {
|
||||
productModel.nonveg == true ? SvgPicture.asset("assets/icons/ic_nonveg.svg") : SvgPicture.asset("assets/icons/ic_veg.svg"),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
productModel.nonveg == true ? "Non Veg.".tr : "Pure veg.".tr,
|
||||
productModel.nonveg == true ? "Non Veg.".tr() : "Pure veg.".tr(),
|
||||
style: TextStyle(
|
||||
color: productModel.nonveg == true ? AppThemeData.danger300 : AppThemeData.success400,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:customer/constant/constant.dart';
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
@@ -28,7 +29,7 @@ class TermsAndConditionScreen extends StatelessWidget {
|
||||
child: Icon(Icons.chevron_left_outlined, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
),
|
||||
title: Text(
|
||||
type == "privacy" ? "Privacy Policy".tr : "Terms & Conditions".tr,
|
||||
type == "privacy" ? "Privacy Policy".tr() : "Terms & Conditions".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey100 : AppThemeData.grey800, fontFamily: AppThemeData.bold, fontSize: 18),
|
||||
),
|
||||
elevation: 0,
|
||||
|
||||
@@ -6,6 +6,7 @@ import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/wallet_scr
|
||||
import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/themes/round_button_fill.dart';
|
||||
import 'package:customer/themes/text_field_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -27,7 +28,7 @@ class PaymentListScreen extends StatelessWidget {
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Top up Wallet".tr, style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
title: Text("Top up Wallet".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
@@ -36,8 +37,8 @@ class PaymentListScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: TextFieldWidget(
|
||||
title: 'Amount'.tr,
|
||||
hintText: 'Enter Amount'.tr,
|
||||
title: 'Amount'.tr(),
|
||||
hintText: 'Enter Amount'.tr(),
|
||||
controller: controller.topUpAmountController.value,
|
||||
textInputType: const TextInputType.numberWithOptions(decimal: true, signed: true),
|
||||
prefix: Padding(padding: const EdgeInsets.all(12.0), child: Text(Constant.currencyModel!.symbol.toString(), style: const TextStyle(fontSize: 20, color: AppThemeData.grey800))),
|
||||
@@ -47,7 +48,7 @@ class PaymentListScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: Text(
|
||||
"Select Top up Options".tr,
|
||||
"Select Top up Options".tr(),
|
||||
style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
@@ -86,14 +87,14 @@ class PaymentListScreen extends StatelessWidget {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title: "Top-up".tr,
|
||||
title: "Top-up".tr(),
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
fontSizes: 16,
|
||||
onPress: () async {
|
||||
if (controller.topUpAmountController.value.text.isEmpty) {
|
||||
ShowToastDialog.showToast("Please Enter Amount".tr);
|
||||
ShowToastDialog.showToast("Please Enter Amount".tr());
|
||||
} else {
|
||||
if (double.parse(controller.topUpAmountController.value.text) >= double.parse(Constant.minimumAmountToDeposit.toString())) {
|
||||
if (controller.selectedPaymentMethod.value == PaymentGateway.stripe.name) {
|
||||
@@ -118,17 +119,17 @@ class PaymentListScreen extends StatelessWidget {
|
||||
RazorPayController().createOrderRazorPay(amount: double.parse(controller.topUpAmountController.value.text), 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.topUpAmountController.value.text, orderId: result.id);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
ShowToastDialog.showToast("Please select payment method".tr);
|
||||
ShowToastDialog.showToast("Please select payment method".tr());
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast("${'Please Enter minimum amount of'.tr} ${Constant.amountShow(amount: Constant.minimumAmountToDeposit)}");
|
||||
ShowToastDialog.showToast("${'Please Enter minimum amount of'.tr()} ${Constant.amountShow(amount: Constant.minimumAmountToDeposit)}");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:customer/models/wallet_transaction_model.dart';
|
||||
import 'package:customer/screen_ui/multi_vendor_service/wallet_screen/payment_list_screen.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 '../../../constant/collection_name.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../models/cab_order_model.dart';
|
||||
@@ -48,16 +49,16 @@ class WalletScreen 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,
|
||||
@@ -86,11 +87,11 @@ class WalletScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"My Wallet".tr,
|
||||
"My Wallet".tr(),
|
||||
style: TextStyle(fontSize: 24, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w500),
|
||||
),
|
||||
Text(
|
||||
"Keep track of your balance, transactions, and payment methods all in one place.".tr,
|
||||
"Keep track of your balance, transactions, and payment methods all in one place.".tr(),
|
||||
style: TextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.regular, fontWeight: FontWeight.w400),
|
||||
),
|
||||
],
|
||||
@@ -112,7 +113,7 @@ class WalletScreen extends StatelessWidget {
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
"My Wallet".tr,
|
||||
"My Wallet".tr(),
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
color: isDark ? AppThemeData.primary100 : AppThemeData.primary100,
|
||||
@@ -130,7 +131,7 @@ class WalletScreen extends StatelessWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 80),
|
||||
child: RoundedButtonFill(
|
||||
title: "Top up".tr,
|
||||
title: "Top up".tr(),
|
||||
color: AppThemeData.warning300,
|
||||
textColor: AppThemeData.grey900,
|
||||
onPress: () {
|
||||
@@ -148,7 +149,7 @@ class WalletScreen extends StatelessWidget {
|
||||
Expanded(
|
||||
child:
|
||||
controller.walletTransactionList.isEmpty
|
||||
? Constant.showEmptyView(message: "Transaction not found".tr)
|
||||
? Constant.showEmptyView(message: "Transaction not found".tr())
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
child: ListView.builder(
|
||||
@@ -197,7 +198,7 @@ class WalletScreen extends StatelessWidget {
|
||||
Get.to(const OrderDetailsScreen(), arguments: {"orderModel": OrderModel.fromJson(orderData)});
|
||||
break;
|
||||
default:
|
||||
ShowToastDialog.showToast("Order details not available".tr);
|
||||
ShowToastDialog.showToast("Order details not available".tr());
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user