StorageWrapper class

Constructors

StorageWrapper.common()
Creates an instance of a local storage manager. Returns a common storage on Web.
StorageWrapper.secure({AndroidOptions? aOptions, IOSOptions? iOptions})
Creates an instance of a secure local storage manager. Returns a common storage on Web.

Properties

hashCode int
The hash code for this object.
no setterinherited
isMocking bool
If mockEntries is not null it means the storage behavior is being mocked.
no setter
mockEntries Map<String, String>?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

containsKey({required String key, IOSOptions? iOptions, AndroidOptions? aOptions}) Future<bool>
Returns true if the key has a corresponding value, false otherwise. For secure storage, iOptions and aOptions allow more control on the data access policy.
delete({required String key, IOSOptions? iOptions, AndroidOptions? aOptions}) Future<bool>
Deletes the value corresponding to the key. For secure storage, iOptions and aOptions allow more control on the data access policy.
deleteAll({IOSOptions? iOptions, AndroidOptions? aOptions}) Future<bool>
Returns true is all the values are successfully deleted. For secure storage, iOptions and aOptions allow more control on the data access policy.
enableMock({Map<String, String>? initialData}) → void
Set mock data for testing purposes Subsequent calls to this method will not have any effect
getAll({IOSOptions? iOptions, AndroidOptions? aOptions}) Future<Map<String, dynamic>>
Returns a Map<String,dynamic> with all the entries of the storage. For secure storage, iOptions and aOptions allow more control on the data access policy.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read({required String key, IOSOptions? iOptions, AndroidOptions? aOptions}) Future<String?>
Read the value corresponding to the key. Returns null for non existing values. For secure storage, iOptions and aOptions allow more control on the data access policy.
toString() String
A string representation of this object.
inherited
write({required String key, required String value, IOSOptions? iOptions, AndroidOptions? aOptions}) Future<bool>
Write the value for the corresponding key. Overwrites it if it already exists. For secure storage, iOptions and aOptions allow more control on the data access policy.

Operators

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