getTransaction method
Get transaction data of transaction with id transactionId
Implementation
Future<Map> getTransaction(String transactionId) async {
var headers = {
'accept': 'application/json',
};
var u = Uri.parse('$url/transactions/$transactionId');
var res = await http.get(u, headers: headers);
if (res.statusCode != 200) {
throw Exception('http.post error: statusCode= ${res.statusCode}');
}
Map output = jsonDecode(res.body);
return output;
}