clearAll method

void clearAll(
  1. {required bool overrideLocks,
  2. required String savedTags}
)

Clear all fields and current context.

Implementation

void clearAll({
  required bool overrideLocks,
  required String savedTags,
}) {
  if (overrideLocks) {
    for (Field field in fieldsByKey.values) {
      getLockedNotifier(field).value = false;
    }
  }

  for (Field field in fieldsByKey.values) {
    clearField(
      field,
      savedTags: savedTags,
      notify: false,
      overrideLocks: overrideLocks,
    );
  }

  notifyListeners();
}