Fund Transfer page with Own Bank and Outside Bank modified

This commit is contained in:
2025-08-27 13:16:26 +05:30
parent a64e68d642
commit d3ad68b25c
6 changed files with 195 additions and 147 deletions

View File

@@ -1,5 +1,4 @@
import 'dart:developer';
import 'package:dio/dio.dart';
import 'package:kmobile/data/models/ifsc.dart';
import 'package:kmobile/data/models/beneficiary.dart';
@@ -105,4 +104,18 @@ class BeneficiaryService {
return [];
}
}
Future<void> deleteBeneficiary(String accountNo) async {
try {
final response = await _dio.delete('/api/beneficiary/$accountNo');
if (response.statusCode != 204) {
throw Exception('Failed to delete beneficiary');
}
} on DioException catch (e) {
throw Exception('Network error: ${e.message}');
} catch (e) {
throw Exception('Unexpected error: ${e.toString()}');
}
}
}