createLocalDocs method
Creates multiple new documents in local state.
Parameters:
ids
- The IDs of the documents to createdocs
- The definition of how to create the documentsdoNotifyListeners
- Whether to notify listeners of the changes
Implementation
@protected
List<T> createLocalDocs({
required List<CreateDocDef<T>> docs,
bool doNotifyListeners = true,
}) {
log.debug('Creating ${docs.length} local docs');
final pDocs = <T>[];
for (final doc in docs) {
final pDoc = createLocalDoc(doc: doc, doNotifyListeners: false);
pDocs.add(pDoc);
}
if (doNotifyListeners) docsPerIdInformer.rebuild();
return pDocs;
}