BASE: Initialize Localization.
This commit is contained in:
@@ -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