CachedRepository<T extends DBModelI> class
This is a wrapper for query
method in FirebaseRepository.
FirebaseRepository.query can be used to get realtime updates from Firestore with the given specification. This wrapper will
- Return data from Firestore cache. Or,
- Return data from online db call.
And for every data returned, it will keep give realtime updates from db in the background.
Constructors
-
CachedRepository(FirebaseRepository<
T> repository) -
This is a wrapper for
query
method in FirebaseRepository.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
repository
→ FirebaseRepository<
T> -
Repository that is used by this wrapper.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
multiTransform(
{required Iterable< DocumentReference< refs}) → Stream<Object?> >List< T> > - Same as RepositoryAddon.multiTransform but with caching
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
{required QueryTransformer< T> spec, required String type, DocumentReference<Object?> ? parent}) → Stream<Iterable< T> > - Same as FirebaseRepository.query but with caching
-
toString(
) → String -
A string representation of this object.
inherited
-
transform(
{required DocumentReference< Object?> ref}) → Stream<T> - Same as RepositoryAddon.transform but with caching
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited