changed imports of AppLocalization

Also added beneficiary validation while quick pay within bank
This commit is contained in:
2025-07-24 22:21:19 +05:30
parent 23d742ace9
commit 787fcdc2e2
42 changed files with 3965 additions and 1025 deletions

View File

@@ -2,14 +2,17 @@ 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';
import '../../../l10n/app_localizations.dart';
class AccountInfoScreen extends StatefulWidget {
final List<User> users;
final int selectedIndex;
const AccountInfoScreen(
{super.key, required this.users, required this.selectedIndex});
const AccountInfoScreen({
super.key,
required this.users,
required this.selectedIndex,
});
@override
State<AccountInfoScreen> createState() => _AccountInfoScreen();
@@ -37,8 +40,10 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
),
title: Text(
AppLocalizations.of(context).accountInfo,
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.w500,
),
),
centerTitle: false,
actions: [
@@ -62,10 +67,7 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
children: [
Text(
AppLocalizations.of(context).accountNumber,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
),
style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
),
/// Dropdown to change account
@@ -93,25 +95,32 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
// InfoRow(title: 'SMS Service', value: user.smsService),
// InfoRow(title: 'Missed Call Service', value: user.missedCallService),*/
InfoRow(
title: AppLocalizations.of(context).customerNumber,
value: selectedUser.cifNumber ?? 'N/A'),
title: AppLocalizations.of(context).customerNumber,
value: selectedUser.cifNumber ?? 'N/A',
),
InfoRow(
title: AppLocalizations.of(context).productName,
value: selectedUser.productType ?? 'N/A'),
title: AppLocalizations.of(context).productName,
value: selectedUser.productType ?? 'N/A',
),
// InfoRow(title: 'Account Opening Date', value: users[selectedIndex].accountOpeningDate ?? 'N/A'),
InfoRow(
title: AppLocalizations.of(context).accountStatus, value: 'OPEN'),
title: AppLocalizations.of(context).accountStatus,
value: 'OPEN',
),
InfoRow(
title: AppLocalizations.of(context).availableBalance,
value: selectedUser.availableBalance ?? 'N/A'),
title: AppLocalizations.of(context).availableBalance,
value: selectedUser.availableBalance ?? 'N/A',
),
InfoRow(
title: AppLocalizations.of(context).currentBalance,
value: selectedUser.currentBalance ?? 'N/A'),
title: AppLocalizations.of(context).currentBalance,
value: selectedUser.currentBalance ?? 'N/A',
),
users[selectedIndex].approvedAmount != null
? InfoRow(
title: AppLocalizations.of(context).approvedAmount,
value: selectedUser.approvedAmount ?? 'N/A')
value: selectedUser.approvedAmount ?? 'N/A',
)
: const SizedBox.shrink(),
],
),
@@ -144,10 +153,7 @@ class InfoRow extends StatelessWidget {
const SizedBox(height: 3),
Text(
value,
style: const TextStyle(
fontSize: 16,
color: Colors.black,
),
style: const TextStyle(fontSize: 16, color: Colors.black),
),
],
),