Language Change
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/data/models/user.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class AccountInfoScreen extends StatefulWidget {
|
||||
final User user;
|
||||
@@ -24,8 +25,8 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Account Info',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).accountInfo,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -48,23 +49,32 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
children: [
|
||||
InfoRow(title: 'Account Number', value: user.accountNo ?? 'N/A'),
|
||||
InfoRow(
|
||||
title: AppLocalizations.of(context).accountNumber,
|
||||
value: user.accountNo ?? 'N/A'),
|
||||
// InfoRow(title: 'Nominee Customer No', value: user.nomineeCustomerNo),
|
||||
// InfoRow(title: 'SMS Service', value: user.smsService),
|
||||
// InfoRow(title: 'Missed Call Service', value: user.missedCallService),
|
||||
InfoRow(title: 'Customer Number', value: user.cifNumber ?? 'N/A'),
|
||||
InfoRow(title: 'Product Name', value: user.productType ?? 'N/A'),
|
||||
// InfoRow(title: 'Account Opening Date', value: user.accountOpeningDate ?? 'N/A'),
|
||||
const InfoRow(title: 'Account Status', value: 'OPEN'),
|
||||
InfoRow(
|
||||
title: 'Available Balance',
|
||||
title: AppLocalizations.of(context).customerNumber,
|
||||
value: user.cifNumber ?? 'N/A'),
|
||||
InfoRow(
|
||||
title: AppLocalizations.of(context).productName,
|
||||
value: user.productType ?? 'N/A'),
|
||||
// InfoRow(title: 'Account Opening Date', value: user.accountOpeningDate ?? 'N/A'),
|
||||
InfoRow(
|
||||
title: AppLocalizations.of(context).accountStatus, value: 'OPEN'),
|
||||
InfoRow(
|
||||
title: AppLocalizations.of(context).availableBalance,
|
||||
value: user.availableBalance ?? 'N/A'),
|
||||
InfoRow(
|
||||
title: 'Current Balance', value: user.currentBalance ?? 'N/A'),
|
||||
title: AppLocalizations.of(context).currentBalance,
|
||||
value: user.currentBalance ?? 'N/A'),
|
||||
|
||||
user.approvedAmount != null
|
||||
? InfoRow(
|
||||
title: 'Approved Amount', value: user.approvedAmount ?? 'N/A')
|
||||
title: AppLocalizations.of(context).approvedAmount,
|
||||
value: user.approvedAmount ?? 'N/A')
|
||||
: const SizedBox.shrink(),
|
||||
],
|
||||
),
|
||||
|
@@ -5,6 +5,7 @@ import 'package:shimmer/shimmer.dart';
|
||||
import 'package:kmobile/data/models/transaction.dart';
|
||||
import 'package:kmobile/data/repositories/transaction_repository.dart';
|
||||
import 'package:kmobile/di/injection.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class AccountStatementScreen extends StatefulWidget {
|
||||
final String accountNo;
|
||||
@@ -109,8 +110,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
icon: const Icon(Symbols.arrow_back_ios_new),
|
||||
onPressed: () => Navigator.pop(context),
|
||||
),
|
||||
title: const Text(
|
||||
'Account Statement',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).accountStatement,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -135,21 +136,24 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text('Filters', style: TextStyle(fontSize: 17)),
|
||||
Text(AppLocalizations.of(context).filters,
|
||||
style: TextStyle(fontSize: 17)),
|
||||
const SizedBox(height: 15),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () => _selectFromDate(context),
|
||||
child: buildDateBox("From Date", fromDate),
|
||||
child: buildDateBox(
|
||||
AppLocalizations.of(context).fromDate, fromDate),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () => _selectToDate(context),
|
||||
child: buildDateBox("To Date", toDate),
|
||||
child: buildDateBox(
|
||||
AppLocalizations.of(context).toDate, toDate),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -160,8 +164,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _minAmountController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Min Amount',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).minAmount,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -175,8 +179,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _maxAmountController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Max Amount',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).maxAmount,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -208,7 +212,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: Text(
|
||||
'Showing last 10 transactions.',
|
||||
AppLocalizations.of(context).lastTenTransactions,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -244,7 +248,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
: _transactions.isEmpty
|
||||
? Center(
|
||||
child: Text(
|
||||
'No transactions found for this account.',
|
||||
AppLocalizations.of(context).noTransactions,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.grey[600],
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
|
||||
class BlockCardScreen extends StatefulWidget {
|
||||
@@ -91,8 +92,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
const SizedBox(height: 10),
|
||||
TextFormField(
|
||||
controller: _cardController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Card Number',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).cardNumber,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -116,8 +117,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _cvvController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'CVV',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).cvv,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -143,8 +144,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
controller: _expiryController,
|
||||
readOnly: true,
|
||||
onTap: _pickExpiryDate,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Expiry Date',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).expiryDate,
|
||||
suffixIcon: Icon(Icons.calendar_today),
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
@@ -167,8 +168,8 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
const SizedBox(height: 24),
|
||||
TextFormField(
|
||||
controller: _phoneController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Phone',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).phone,
|
||||
prefixIcon: Icon(Icons.phone),
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
@@ -185,7 +186,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
keyboardType: TextInputType.phone,
|
||||
validator: (value) => value != null && value.length >= 10
|
||||
? null
|
||||
: 'Enter valid phone number',
|
||||
: AppLocalizations.of(context).enterValidPhone,
|
||||
),
|
||||
const SizedBox(height: 45),
|
||||
Align(
|
||||
@@ -200,7 +201,7 @@ class _BlockCardScreen extends State<BlockCardScreen> {
|
||||
backgroundColor: Colors.blue[900],
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Block'),
|
||||
child: Text(AppLocalizations.of(context).block),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@@ -3,6 +3,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/features/card/screens/block_card_screen.dart';
|
||||
import 'package:kmobile/features/card/screens/card_pin_change_details_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class CardManagementScreen extends StatefulWidget {
|
||||
const CardManagementScreen({super.key});
|
||||
@@ -42,7 +43,7 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
children: [
|
||||
CardManagementTile(
|
||||
icon: Symbols.add,
|
||||
label: 'Apply Debit Card',
|
||||
label: AppLocalizations.of(context).applyDebitCard,
|
||||
onTap: () {},
|
||||
),
|
||||
const Divider(
|
||||
@@ -50,7 +51,7 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
),
|
||||
CardManagementTile(
|
||||
icon: Symbols.remove_moderator,
|
||||
label: 'Block / Unblock Card',
|
||||
label: AppLocalizations.of(context).blockUnblockCard,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -63,7 +64,7 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
),
|
||||
CardManagementTile(
|
||||
icon: Symbols.password_2,
|
||||
label: 'Change Card PIN',
|
||||
label: AppLocalizations.of(context).changeCardPin,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
|
@@ -3,6 +3,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:kmobile/features/card/screens/card_pin_set_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class CardPinChangeDetailsScreen extends StatefulWidget {
|
||||
const CardPinChangeDetailsScreen({super.key});
|
||||
@@ -81,8 +82,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
const SizedBox(height: 10),
|
||||
TextFormField(
|
||||
controller: _cardController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Card Number',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).cardNumber,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -106,8 +107,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
controller: _cvvController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'CVV',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).cvv,
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
filled: true,
|
||||
@@ -133,8 +134,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
controller: _expiryController,
|
||||
readOnly: true,
|
||||
onTap: _pickExpiryDate,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Expiry Date',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).expiryDate,
|
||||
suffixIcon: Icon(Icons.calendar_today),
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
@@ -157,8 +158,8 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
const SizedBox(height: 24),
|
||||
TextFormField(
|
||||
controller: _phoneController,
|
||||
decoration: const InputDecoration(
|
||||
labelText: 'Phone',
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).phone,
|
||||
prefixIcon: Icon(Icons.phone),
|
||||
border: OutlineInputBorder(),
|
||||
isDense: true,
|
||||
@@ -190,7 +191,7 @@ class _CardPinChangeDetailsScreen extends State<CardPinChangeDetailsScreen> {
|
||||
backgroundColor: Colors.blue[900],
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('Next'),
|
||||
child: Text(AppLocalizations.of(context).next),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class CardPinSetScreen extends StatefulWidget {
|
||||
const CardPinSetScreen({super.key});
|
||||
|
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class ChequeManagementScreen extends StatefulWidget {
|
||||
const ChequeManagementScreen({super.key});
|
||||
|
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class EnquiryScreen extends StatefulWidget {
|
||||
const EnquiryScreen({super.key});
|
||||
@@ -16,7 +17,7 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
if (await canLaunchUrl(emailUri)) {
|
||||
await launchUrl(emailUri);
|
||||
} else {
|
||||
debugPrint('Could not launch email client for $email');
|
||||
debugPrint('${AppLocalizations.of(context).emailLaunchError} $email');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +26,7 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
if (await canLaunchUrl(phoneUri)) {
|
||||
await launchUrl(phoneUri);
|
||||
} else {
|
||||
debugPrint('Could not launch dialer for $phone');
|
||||
debugPrint('${AppLocalizations.of(context).dialerLaunchError} $phone');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,8 +59,8 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Enquiry',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).enquiry,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -87,16 +88,17 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
// … existing Mail us / Call us / Write to us …
|
||||
|
||||
const SizedBox(height: 20),
|
||||
const Text("Write to us", style: TextStyle(color: Colors.grey)),
|
||||
Text(AppLocalizations.of(context).writeToUs,
|
||||
style: TextStyle(color: Colors.grey)),
|
||||
const SizedBox(height: 4),
|
||||
const Text(
|
||||
"complaint@kccb.in",
|
||||
style: TextStyle(color: Colors.blue),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
SizedBox(height: 20),
|
||||
Text(
|
||||
"Key Contacts",
|
||||
AppLocalizations.of(context).keyContacts,
|
||||
style: TextStyle(
|
||||
fontSize: 17,
|
||||
color: Theme.of(context).primaryColor,
|
||||
@@ -106,25 +108,25 @@ class _EnquiryScreen extends State<EnquiryScreen> {
|
||||
Divider(color: Colors.grey[300]),
|
||||
const SizedBox(height: 16),
|
||||
_buildContactItem(
|
||||
"Chairman",
|
||||
AppLocalizations.of(context).chairman,
|
||||
"chairman@kccb.in",
|
||||
"01892-222677",
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildContactItem(
|
||||
"Managing Director",
|
||||
AppLocalizations.of(context).managingDirector,
|
||||
"md@kccb.in",
|
||||
"01892-224969",
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildContactItem(
|
||||
"General Manager (West)",
|
||||
AppLocalizations.of(context).gmWest,
|
||||
"gmw@kccb.in",
|
||||
"01892-223280",
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
_buildContactItem(
|
||||
"General Manager (North)",
|
||||
AppLocalizations.of(context).gmNorth,
|
||||
"gmn@kccb.in",
|
||||
"01892-224607",
|
||||
),
|
||||
|
@@ -3,6 +3,7 @@ import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/add_beneficiary_screen.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class FundTransferBeneficiaryScreen extends StatefulWidget {
|
||||
const FundTransferBeneficiaryScreen({super.key});
|
||||
@@ -43,8 +44,8 @@ class _FundTransferBeneficiaryScreen
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Fund Transfer - Beneficiary',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).fundTransferBeneficiary,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
|
@@ -2,6 +2,7 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/transaction_pin_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
class FundTransferScreen extends StatefulWidget {
|
||||
const FundTransferScreen({super.key});
|
||||
@@ -82,8 +83,8 @@ class _FundTransferScreen extends State<FundTransferScreen> {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: const Text(
|
||||
'Fund Transfer',
|
||||
title: Text(
|
||||
AppLocalizations.of(context).fundTransfer,
|
||||
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
@@ -101,10 +102,10 @@ class _FundTransferScreen extends State<FundTransferScreen> {
|
||||
body: Column(
|
||||
children: [
|
||||
const Spacer(),
|
||||
const Row(
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text('Debit from:'),
|
||||
Text(AppLocalizations.of(context).debitFrom),
|
||||
Text(
|
||||
'0300015678903456',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
|
||||
@@ -112,7 +113,8 @@ class _FundTransferScreen extends State<FundTransferScreen> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const Text('Enter Amount', style: TextStyle(fontSize: 20)),
|
||||
Text(AppLocalizations.of(context).enterAmount,
|
||||
style: TextStyle(fontSize: 20)),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
@@ -136,8 +138,7 @@ class _FundTransferScreen extends State<FundTransferScreen> {
|
||||
mainAxisSpacing: 12,
|
||||
crossAxisSpacing: 12,
|
||||
childAspectRatio: 1.2,
|
||||
children:
|
||||
keys.map((key) => buildKey(key)).toList(),
|
||||
children: keys.map((key) => buildKey(key)).toList(),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user