StorageRepository class abstract
Abstract class for the storage repository, serving as an interface for dependency injection (DI) patterns.
This interface defines methods for interacting with a key-value storage system. Implementations should provide secure or non-secure data persistence options.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
asString(
) → Future< String> - Returns a string representation of all stored data.
-
clear(
) → Future - Clears all stored data in the repository.
-
contains(
dynamic key) → Future< bool> - Checks whether a given key exists in the storage.
-
delete(
dynamic key) → Future< bool> - Deletes a value stored under the specified key.
-
get(
dynamic key) → dynamic - Retrieves the value stored under the specified key.
-
getAll(
) → Future< Map< String, dynamic> > - Retrieves all stored key-value pairs.
-
init(
) → Future< StorageRepository> - Initializes the storage repository.
-
log(
) → Future - Logs all stored data to the console.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String key, dynamic value) → Future< bool> - Saves a value under the specified key.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
initFlutter(
) → Future< void> - Initializes Hive for Flutter.