addSubaddressSync function
void
addSubaddressSync(
{ - required int accountIndex,
- required String label,
})
Implementation
void addSubaddressSync({required int accountIndex, required String label}) {
final labelPointer = label.toNativeUtf8().cast<Char>();
final errorBoxPointer = monero_flutter.buildErrorBoxPointer();
monero_flutter.bindings.subaddress_add_row(accountIndex, labelPointer, errorBoxPointer);
calloc.free(labelPointer);
final errorInfo = monero_flutter.extractErrorInfo(errorBoxPointer);
if (0 != errorInfo.code) {
throw Exception(errorInfo.getErrorMessage());
}
}