BaseStorage class abstract

A base class for storage implementations that use a StorageBackend.

This class provides common functionality for storage classes that interact with a backend storage system. It implements the ListenableStorage interface to allow listening for changes in the storage.

The backend is required and must be provided when creating an instance of a subclass.

Implementers

Constructors

BaseStorage({required StorageBackend backend})
Creates a new instance of BaseStorage with the given backend.

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Returns true if there are any listeners registered (global or keyed).
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addKeyListener(String key, ListenableCallback listener) → void
Registers a listener to be called when data for a specific key changes.
inherited
addListener(ListenableCallback listener) → void
Registers a global listener to be called when any data in the storage changes.
inherited
hasKeyListeners(String key) → bool
Returns true if there are any listeners registered for the given key.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners([String? key]) → void
Notifies all registered listeners of a change.
inherited
removeAllKeyListeners(String key) → void
Removes all listeners registered for a specific key.
inherited
removeAllListeners() → void
Removes all registered listeners, both global and key-specific.
inherited
removeKeyListener(String key, ListenableCallback listener) → void
Removes a previously registered key-specific listener.
inherited
removeListener(ListenableCallback listener) → void
Removes a previously registered global listener.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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