exists method
Check if key exists in storage
Implementation
Future<bool> exists(String key) async {
try {
final lib = PlatformLoader.load();
final existsFn = lib.lookupFunction<
Int32 Function(Pointer<Utf8>),
int Function(Pointer<Utf8>)>('rac_storage_exists');
final keyPtr = key.toNativeUtf8();
try {
return existsFn(keyPtr) != 0;
} finally {
calloc.free(keyPtr);
}
} catch (e) {
_logger.debug('rac_storage_exists not available: $e');
return false;
}
}