AmplifySecureStorageDart class

Secure Storage implementation in Dart, supporting web and desktop platforms.

Example:

// create storage instance
AmplifySecureStorageDart storage = AmplifySecureStorageDart();

// write to storage
storage.write(key: 'my_key', value: 'my value');

// read from storage
final value = await storage.read(key: 'my_key');

// delete from storage
storage.delete(key: 'my_key');
Inheritance
Mixed in types

Constructors

AmplifySecureStorageDart({required AmplifySecureStorageConfig config})
Generates a AmplifySecureStorage from a config.

Properties

config AmplifySecureStorageConfig
Configuration options for Secure Storage.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
logger → AWSLogger
The logger for this class.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
runtimeTypeName String
The string value of runtimeType, saving a runtime lookup and preventing obfuscation during web compilation.
no setterinherited

Methods

delete({required String key}) FutureOr<void>
Remove a key/value pair from storage.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read({required String key}) FutureOr<String?>
Read the value of a given key.
inherited
removeAll() FutureOr<void>
Removes all key-value pairs for the current scope.
inherited
toString() String
A string representation of this object.
inherited
write({required String key, required String value}) FutureOr<void>
Write a key-value pair to storage.
inherited

Operators

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

Static Methods

factoryFrom({WebSecureStorageOptions? webOptions, WindowsSecureStorageOptions? windowsOptions, LinuxSecureStorageOptions? linuxOptions, MacOSSecureStorageOptions? macOSOptions, IOSSecureStorageOptions? iOSOptions}) AmplifySecureStorageDart Function(AmplifySecureStorageScope amplifyScope)
Returns a factory for creating AmplifySecureStorageDart instances.