store function

void store({
  1. required String path,
})

Implementation

void store({required String path}) {
  final pathPointer = path.toNativeUtf8().cast<Char>();
  final errorBoxPointer = monero_flutter.buildErrorBoxPointer();
  monero_flutter.bindings.store(pathPointer, errorBoxPointer);

  calloc.free(pathPointer);

  final errorInfo = monero_flutter.extractErrorInfo(errorBoxPointer);

  if (0 != errorInfo.code) {
    throw Exception(errorInfo.getErrorMessage());
  }
}