NativeStorage class abstract interface

An interface for native storage implementations.

Constructors

NativeStorage({String? namespace, String? scope})
Provides app-local storage of key-value pairs.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isolated → IsolatedNativeStorage
A NativeStorage that performs storage operations asynchronously on a separate isolate.
no setter
namespace → String
The main identifier all values are stored under.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scope → String?
An optional tag for separating values for different parts of your app.
no setter
secure → NativeSecureStorage
Provides platform-specific secure storage, typically using the OS's secure keychain or keystore.
no setter

Methods

clear() → void
Clears all values synchronously for the configured namespace and scope from storage.
close() → void
Frees up any resources associated with this storage instance.
delete(String key) → String?
Deletes a value synchronously from storage.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(String key) → String?
Reads a value synchronously from storage.
scoped(String scope) → NativeStorage
Creates a new NativeStorage instance with the same configuration as this instance, but with the provided scope.
toString() → String
A string representation of this object.
inherited
write(String key, String value) → String
Writes a value synchronously to storage.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instances → Map<(String, String?), NativeStorage>
final