createWalletSync function
void
createWalletSync({})
Implementation
void createWalletSync(
{required String path,
required String password,
required String language,
int nettype = 0}) {
final pathPointer = path.toNativeUtf8().cast<Char>();
final passwordPointer = password.toNativeUtf8().cast<Char>();
final languagePointer = language.toNativeUtf8().cast<Char>();
final errorBoxPointer = monero_flutter.buildErrorBoxPointer();
monero_flutter.bindings.create_wallet(
pathPointer, passwordPointer, languagePointer, nettype, errorBoxPointer);
final errorInfo = monero_flutter.extractErrorInfo(errorBoxPointer);
calloc.free(pathPointer);
calloc.free(passwordPointer);
calloc.free(languagePointer);
if (0 != errorInfo.code) {
throw WalletCreationException(message: errorInfo.getErrorMessage());
}
}