trackStateChange static method

void trackStateChange(
  1. String id,
  2. dynamic oldValue,
  3. dynamic newValue
)

Track state change (only called when enabled) Internal use only - called from Rx value setter

Implementation

static void trackStateChange(String id, dynamic oldValue, dynamic newValue) {
  if (!_enabled || !_trackStateHistory) return;

  _stateHistory.add(_StateSnapshot(
    stateId: id,
    oldValue: oldValue,
    newValue: newValue,
    timestamp: DateTime.now(),
  ));

  _trimHistory();
}