clearLocalDoc method

void clearLocalDoc({
  1. bool doNotifyListeners = true,
})

Clears the local document state.

Implementation

void clearLocalDoc({bool doNotifyListeners = true}) {
  log.debug('Clearing local doc');
  if (doNotifyListeners) {
    beforeLocalNotifyUpdate?.call(null);
  }
  _doc.update(
    defaultDoc(),
    doNotifyListeners: doNotifyListeners,
  );
  if (doNotifyListeners) {
    afterLocalNotifyUpdate?.call(null);
  }
}