LocalAdapter<T extends DataModelMixin<T>> class abstract

An adapter interface to access local storage.

Identity in this layer is enforced by keys.

See also: HiveLocalAdapter

Implementers

Constructors

LocalAdapter(Ref<Object?> ref)

Properties

graph GraphNotifier
final
hashCode int
The hash code for this object.
no setterinherited
internalType String
no setter
isInitialized bool
no setterinherited
relationshipMetas Map<String, RelationshipMeta<DataModelMixin>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Deletes all models of type T in local storage.
delete(String key, {bool notify = true}) Future<void>
Deletes model of type T with key from local storage.
deserialize(Map<String, dynamic> map) → T
dispose() → void
inherited
findAll() List<T>
Returns all models of type T in local storage.
findOne(String? key) → T?
Finds model of type T by key in local storage.
initialize() FutureOr<LocalAdapter<T>>
initModel(T model, {dynamic onModelInitialized(T)?}) → T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(String key, T model, {bool notify = true}) Future<T>
Saves model of type T with key in local storage.
serialize(T model, {bool withRelationships = true}) Map<String, dynamic>
toString() String
A string representation of this object.
inherited
transformDeserialize(Map<String, dynamic> map) Map<String, dynamic>
transformSerialize(Map<String, dynamic> map, {bool withRelationships = true}) Map<String, dynamic>

Operators

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