updateLocalDocs method
List<DTO>
updateLocalDocs({
- required List<
String> ids, - required UpdateDocDef<
DTO, MODEL> 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<DTO> updateLocalDocs({
required List<String> ids,
required UpdateDocDef<DTO, MODEL> doc,
bool doNotifyListeners = true,
}) {
log.debug('Updating ${ids.length} local docs');
final pDocs = <DTO>[];
for (final id in ids) {
final pDoc = updateLocalDoc(id: id, doc: doc, doNotifyListeners: false);
pDocs.add(pDoc);
}
if (doNotifyListeners) docsNotifier.rebuild();
return pDocs;
}