hyper_storage library

Classes

BaseStorage
A base class for storage implementations that use a StorageBackend.
HyperStorage Introduction Getting Started
The main entry point for the HyperStorage library, providing centralized storage management with a singleton pattern.
HyperStorageContainer Containers
A concrete implementation of StorageContainer for storing key-value pairs.
InMemoryBackend
A volatile storage backend that stores all data in memory.
ItemHolder<E extends Object> Item Holders Enums
A basic implementation of ItemHolderApi for simple types.
ItemHolderApi<E extends Object>
Defines the interface for a holder of a single item of type E.
JsonItemHolder<E extends Object>
A JSON-based item holder for managing serialized items.
JsonStorageContainer<E extends Object>
A final implementation of SerializableStorageContainer for JSON-serializable objects.
SerializableItemHolder<E extends Object>
A base class for item holders that manage serialization and deserialization.
SerializableStorageContainer<E extends Object>
An abstract class that provides a container for storing serializable objects of type E.
SerializableStorageOperationsApi<E>
Defines the interface for storage operations on serializable objects of type E.
StorageBackend Backends
An abstract class that defines the contract for a storage backend.
StorageOperationsApi
Defines the interface for basic storage operations.

Mixins

BaseListenable Reactivity
A mixin that provides functionality for listening..
ItemHolderMixin
A mixin that provides item holder creation methods for a storage and containers.

Typedefs

DeserializeCallback<E> = E Function(String value)
A function that deserializes a string back to an object of type E.
FromJson<E> = E Function(Map<String, dynamic> json)
A function that converts a JSON map to an object of type E.
IdGetter<E> = String Function(E object)
A function that takes an object of type E and returns its ID as a string.
ItemGetter<E extends Object> = Future<E?> Function(StorageBackend backend, String key)
Function type definition for getting an item from the storage backend.
ItemSetter<E extends Object> = Future<void> Function(StorageBackend backend, String key, E value)
Function type definition for setting an item in the storage backend.
ListenableCallback = void Function()
A callback function that takes no arguments and returns no data.
SerializeCallback<E> = String Function(E value)
A function that serializes an object of type E to a string.
ToJson<E> = Map<String, dynamic> Function(E object)
A function that converts an object of type E to a JSON map.