CachedRepository<T extends DBModelI> constructor
CachedRepository<T extends DBModelI> (
- FirebaseRepository<
T> repository
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.
Implementation
CachedRepository(this.repository)
: _addon = RepositoryAddon(repository: repository);