transferFund method
Executes network call to initiate transactions
Implementation
Future<FundTransferResponse?> transferFund() async {
FundTransferResponse? transferResponse = FundTransferResponse();
final url = "${Utils.getBaseUrl(isTest!)}/${Utils.transferUrl}";
final response = await http.post(Uri.parse(url),
headers: {
"Authorization": "Bearer $publicKey",
"Content-Type": "application/json"
},
body: toJson()
);
final responseBody = jsonDecode(response.body);
transferResponse = FundTransferResponse.fromJson(responseBody);
return transferResponse;
}