updateLocalDocs method
List<T>
updateLocalDocs({
- required List<
String> ids, - required UpdateDocDef<
T> doc, - bool doNotifyListeners = true,
Updates multiple existing documents in local state.
Parameters:
ids
- The IDs of the documents to updatedoc
- The definition of how to update the documentsdoNotifyListeners
- Whether to notify listeners of the changes
Implementation
@protected
List<T> updateLocalDocs({
required List<String> ids,
required UpdateDocDef<T> doc,
bool doNotifyListeners = true,
}) {
log.debug('Updating ${ids.length} local docs');
final pDocs = <T>[];
for (final id in ids) {
final pDoc = updateLocalDoc(id: id, doc: doc, doNotifyListeners: false);
pDocs.add(pDoc);
}
if (doNotifyListeners) docsPerIdInformer.rebuild();
return pDocs;
}