Test APK build

This commit is contained in:
2025-12-31 11:45:21 +05:30
parent 9d8c8dc8bd
commit 60270a5fa9
3 changed files with 129 additions and 58 deletions

View File

@@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:dio/dio.dart';
class Cheque {
final String? type;
@@ -104,9 +106,16 @@ class ChequeService {
String? stopAmount,
String? stopComment,
String? chequeIssueDate,
required String tpin,
}) async {
final response = await _dio.post(
'/api/cheque/stop',
options: Options(
validateStatus: (int? status) => true,
receiveDataWhenStatusError: true,
),
data: {
'accountNumber': accountno,
'stopFromChequeNo': stopFromChequeNo,
@@ -117,11 +126,12 @@ class ChequeService {
'stopAmount': stopAmount,
'stopComment': stopComment,
'chqIssueDate': chequeIssueDate,
'tpin':tpin,
},
);
if (response.statusCode != 200) {
throw Exception("Error");
}
return response.toString();
if (response.statusCode != 200) {
throw Exception(jsonEncode(response.data));
}
return response.toString();
}
}