fetchTransactionsByUser static method
Implementation
static Future<dynamic> fetchTransactionsByUser(String userId) async {
try {
final result = await _channel.invokeMethod('fetchTransactionsByUser', {
'userId': userId,
});
print("FETCH TRANSACTIONS BY USERS RESULT = ${result}");
final transactions = json.decode(result);
return transactions;
} on PlatformException catch (exception) {
return exception;
}
}