deleteLocalDoc method

  1. @protected
void deleteLocalDoc({
  1. required String id,
  2. bool doNotifyListeners = true,
})

Deletes a document from local state.

Parameters:

  • id - The document ID
  • doNotifyListeners - 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);
  }
}