createLocalDocs method
List<DTO>
createLocalDocs({
- required List<
CreateDocDef< docs,DTO, MODEL> > - bool doNotifyListeners = true,
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<DTO> createLocalDocs({
required List<CreateDocDef<DTO, MODEL>> docs,
bool doNotifyListeners = true,
}) {
log.debug('Creating ${docsNotifier.value.length} local docs');
final pDocs = <DTO>[];
for (final doc in docs) {
final pDoc = createLocalDoc(doc: doc, doNotifyListeners: false);
pDocs.add(pDoc);
}
if (doNotifyListeners) docsNotifier.rebuild();
return pDocs;
}