getAllAccount function
Implementation
List<AccountRow> getAllAccount() {
final errorBoxPointer1 = monero_flutter.buildErrorBoxPointer();
final size = monero_flutter.bindings.account_size(errorBoxPointer1);
final errorInfo1 = monero_flutter.extractErrorInfo(errorBoxPointer1);
if (0 != errorInfo1.code) {
throw Exception(errorInfo1.getErrorMessage());
}
final errorBoxPointer2 = monero_flutter.buildErrorBoxPointer();
final errorInfo2 = monero_flutter.extractErrorInfo(errorBoxPointer2);
if (0 != errorInfo2.code) {
throw Exception(errorInfo2.getErrorMessage());
}
final accountAddressesPointer = monero_flutter.bindings.account_get_all(errorBoxPointer2);
final accountAddresses = accountAddressesPointer.asTypedList(size);
final result = accountAddresses
.map((addr) => Pointer<AccountRow>.fromAddress(addr).ref)
.toList();
monero_flutter.bindings.free_block_of_accounts(accountAddressesPointer, size);
return result;
}