resetTarget method

bool resetTarget(
  1. String targetId
)

Resets every property on targetId to its declared initial value.

Implementation

bool resetTarget(String targetId) {
  final properties = _schemas[targetId];
  final current = _values[targetId];
  if (properties == null || current == null) return false;
  final defaults = _defaultMap(properties);
  if (_mapsEqual(current, defaults)) return true;
  _values[targetId] = defaults;
  notifyListeners();
  return true;
}