deleteLocalDoc method
Deletes a document from local state.
Parameters:
id
- The document IDdoNotifyListeners
- Whether to notify listeners of the change
Implementation
@protected
void deleteLocalDoc({
required String id,
bool doNotifyListeners = true,
}) {
log.debug('Deleting local doc with id: $id');
if (doNotifyListeners) {
beforeLocalNotifyUpdate?.call(null);
}
_doc.update(null, doNotifyListeners: doNotifyListeners);
if (doNotifyListeners) {
afterLocalNotifyUpdate?.call(null);
}
}