BASE: Switch From EasyLocalization To GetX Localization.
This commit is contained in:
@@ -8,11 +8,11 @@ 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';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
import 'history_gift_card.dart';
|
||||
@@ -34,7 +34,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,
|
||||
@@ -131,9 +131,9 @@ 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,
|
||||
@@ -151,7 +151,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
vertical: 14,
|
||||
),
|
||||
child: Text(
|
||||
Constant.currencyModel!.symbol.tr(),
|
||||
Constant.currencyModel!.symbol.tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -233,9 +233,9 @@ class GiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 40),
|
||||
TextFieldWidget(
|
||||
title: 'Add Message (Optional)'.tr(),
|
||||
title: 'Add Message (Optional)'.tr,
|
||||
controller: controller.messageController.value,
|
||||
hintText: 'Add message here....'.tr(),
|
||||
hintText: 'Add message here....'.tr,
|
||||
maxLine: 6,
|
||||
),
|
||||
],
|
||||
@@ -248,7 +248,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,
|
||||
@@ -258,13 +258,13 @@ class GiftCardScreen extends StatelessWidget {
|
||||
if (Constant.userModel == null) {
|
||||
ShowToastDialog.showToast(
|
||||
"Please log in to the application. You are not logged in."
|
||||
.tr(),
|
||||
.tr,
|
||||
);
|
||||
} else {
|
||||
giftCardBottomSheet(context, controller);
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.showToast("Please enter Amount".tr());
|
||||
ShowToastDialog.showToast("Please enter Amount".tr);
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -330,7 +330,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
'Complete payment and share this e-gift card with loved ones using any app'
|
||||
.tr(),
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
color: AppThemeData.ecommerce300,
|
||||
fontSize: 14,
|
||||
@@ -344,7 +344,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Bill Details".tr(),
|
||||
"Bill Details".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -380,7 +380,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Sub Total".tr(),
|
||||
"Sub Total".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -422,7 +422,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Grand Total".tr(),
|
||||
"Grand Total".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
@@ -466,8 +466,8 @@ 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,
|
||||
@@ -494,7 +494,7 @@ class GiftCardScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: RoundedButtonFill(
|
||||
title:
|
||||
"${'Pay'.tr()} ${Constant.amountShow(amount: controller.amountController.value.text)}",
|
||||
"${'Pay'.tr} ${Constant.amountShow(amount: controller.amountController.value.text)}",
|
||||
height: 5.5,
|
||||
color: AppThemeData.primary300,
|
||||
textColor: AppThemeData.grey50,
|
||||
|
||||
@@ -2,9 +2,9 @@ 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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../widget/my_separator.dart';
|
||||
|
||||
@@ -33,7 +33,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
child:
|
||||
controller.giftCardsOrderList.isEmpty
|
||||
? Constant.showEmptyView(
|
||||
message: "Purchased Gift card not found".tr(),
|
||||
message: "Purchased Gift card not found".tr,
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: controller.giftCardsOrderList.length,
|
||||
@@ -111,7 +111,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gift Code".tr(),
|
||||
"Gift Code".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -150,7 +150,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"Gift Pin".tr(),
|
||||
"Gift Pin".tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -272,7 +272,7 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'Share'.tr(),
|
||||
'Share'.tr,
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
@@ -298,8 +298,8 @@ class HistoryGiftCard extends StatelessWidget {
|
||||
const Expanded(child: SizedBox()),
|
||||
Text(
|
||||
giftCardOrderModel.redeem == true
|
||||
? "Redeemed".tr()
|
||||
: "Not Redeem".tr(),
|
||||
? "Redeemed".tr
|
||||
: "Not Redeem".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
|
||||
@@ -7,11 +7,12 @@ 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 'package:customer/utils/app_router.dart';
|
||||
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
import '../dash_board_screens/dash_board_screen.dart';
|
||||
@@ -43,7 +44,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Redeem Gift Card".tr(),
|
||||
"Redeem Gift Card".tr,
|
||||
style: TextStyle(
|
||||
fontSize: 24,
|
||||
color:
|
||||
@@ -54,7 +55,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
"Enter your gift card code to enjoy discounts and special offers on your orders."
|
||||
.tr(),
|
||||
.tr,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color:
|
||||
@@ -65,9 +66,9 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
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),
|
||||
@@ -75,9 +76,9 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
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),
|
||||
@@ -94,18 +95,18 @@ 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(
|
||||
" ",
|
||||
@@ -117,17 +118,17 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
if (giftCodeModel.redeem == true) {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast(
|
||||
"Gift voucher already redeemed".tr(),
|
||||
"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;
|
||||
|
||||
@@ -171,7 +172,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
controller.selectedIndex.value = 2;
|
||||
}
|
||||
ShowToastDialog.showToast(
|
||||
"Voucher redeem successfully".tr(),
|
||||
"Voucher redeem successfully".tr,
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -180,7 +181,7 @@ class RedeemGiftCardScreen extends StatelessWidget {
|
||||
}
|
||||
} else {
|
||||
ShowToastDialog.closeLoader();
|
||||
ShowToastDialog.showToast("Invalid Gift Code".tr());
|
||||
ShowToastDialog.showToast("Invalid Gift Code".tr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,9 +4,9 @@ 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' hide Trans;
|
||||
import 'package:get/get.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../themes/show_toast_dialog.dart';
|
||||
import '../wallet_screen/wallet_screen.dart';
|
||||
@@ -30,7 +30,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
"Payment Option".tr(),
|
||||
"Payment Option".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
@@ -46,7 +46,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"Preferred Payment".tr(),
|
||||
"Preferred Payment".tr,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
@@ -102,7 +102,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,
|
||||
@@ -261,7 +261,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,
|
||||
@@ -335,8 +335,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
if (value == null) {
|
||||
Get.back();
|
||||
ShowToastDialog.showToast(
|
||||
"Something went wrong, please contact admin."
|
||||
.tr(),
|
||||
"Something went wrong, please contact admin.".tr,
|
||||
);
|
||||
} else {
|
||||
CreateRazorPayOrderModel result = value;
|
||||
@@ -348,7 +347,7 @@ class SelectGiftPaymentScreen extends StatelessWidget {
|
||||
});
|
||||
} else {
|
||||
ShowToastDialog.showToast(
|
||||
"Please select payment method".tr(),
|
||||
"Please select payment method".tr,
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user