resetAll method

void resetAll()

Resets the value of all properties defined in the currentProps list to their original value.

Implementation

void resetAll() {
  final resetEvents = <CurrentStateChanged>[];
  for (final prop in currentProps) {
    final previousValue = prop.value;
    prop.reset(notifyChange: false);

    resetEvents.add(
      CurrentStateChanged(
        prop.value,
        previousValue,
        propertyName: prop.propertyName,
        sourceHashCode: prop.sourceHashCode,
      ),
    );
  }

  notifyChanges(resetEvents);
  _busyTaskKeys.clear();
  setNotBusy();
}