Payment Error Message and Beneficiary Page
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
import 'package:kmobile/data/models/ifsc.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/data/models/user.dart';
|
||||
import 'beneficiary_result_page.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import '../../../di/injection.dart';
|
||||
@@ -36,12 +35,11 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
final TextEditingController phoneController = TextEditingController();
|
||||
final service = getIt<BeneficiaryService>();
|
||||
|
||||
String? _beneficiaryName;
|
||||
bool _isValidating = false;
|
||||
bool _isBeneficiaryValidated = false;
|
||||
// ignore: unused_field
|
||||
String? _validationError;
|
||||
late String accountType;
|
||||
final String _selectedAccountType = 'Savings'; // default value
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -335,6 +333,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
// 🔹 IFSC Code Field
|
||||
TextFormField(
|
||||
controller: ifscController,
|
||||
maxLength: 11,
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(11),
|
||||
],
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).ifscCode,
|
||||
border: const OutlineInputBorder(),
|
||||
|
@@ -61,13 +61,20 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
}
|
||||
|
||||
Widget _getBankLogo(String? bankName) {
|
||||
if (bankName != null && bankName.toLowerCase().contains('state bank of india')) {
|
||||
if (bankName != null && bankName.toLowerCase().contains('state bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/sbi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
|
||||
return Image.asset(
|
||||
'assets/images/icon.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('hdfc bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/hdfc_logo.png',
|
||||
@@ -113,11 +120,11 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
backgroundColor: Colors.transparent,
|
||||
child: _getBankLogo(item.bankName),
|
||||
),
|
||||
title: Text(item.name ?? 'Unknown'),
|
||||
title: Text(item.name),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(item.accountNo ?? 'No account number'),
|
||||
Text(item.accountNo),
|
||||
if (item.bankName != null && item.bankName!.isNotEmpty)
|
||||
Text(
|
||||
item.bankName!,
|
||||
|
Reference in New Issue
Block a user