getAccountById method
Gets an account by its unique id.
correlationId
(optional) transaction id to trace execution through call chain.id
an id of account to be retrieved. Return Future that receives account or error.
Implementation
@override
Future<AccountV1?> getAccountById(String? correlationId, String id) async {
var accounts = _accounts.where((x) {
return x.id == id;
}).toList();
var account = accounts.isNotEmpty ? accounts[0] : null;
return account;
}