FirestoreCollection constructor
FirestoreCollection({
- required CollectionReference<
Object?> collection, - bool initializeOnStart = true,
- required List<
Query< queryList,Object?> > - required QueryOrder queryOrder,
- bool live = false,
- bool serverOnly = true,
- bool includeMetadataChanges = true,
- bool ignoreRemovedUpdate = false,
- bool keepDuplicatedDocs = true,
- required int offset,
- dynamic onNewPage()?,
- dynamic onDocumentChanged()?,
- dynamic onItemRemoved()?,
- Map<
String, dynamic> ? fakeRemoveMap, - dynamic shouldUpdate()?,
Implementation
FirestoreCollection({
required this.collection,
this.initializeOnStart = true,
// TODO: merge this field with collection field
required List<Query> queryList,
required this.queryOrder,
this.live = false,
this.serverOnly = true,
this.includeMetadataChanges = true,
this.ignoreRemovedUpdate = false,
this.keepDuplicatedDocs = true,
required this.offset,
this.onNewPage,
this.onDocumentChanged,
this.onItemRemoved,
this.fakeRemoveMap,
this.shouldUpdate,
}) : assert((queryList.isNotEmpty), 'queryList can not be empty.') {
log('firestore_collection: $hashCode. created.');
_ql = queryList;
_init();
if (initializeOnStart) {
restart();
}
}