refreshOriginals method

  1. @override
void refreshOriginals()
override

Called after a successful PUT request, this method refreshed the "original" data in this object.

This way, on the next PUT request, the program will know what data is actually new.

Implementation

@override
void refreshOriginals() {
  metadata.refreshOriginals();
  _originalMetadata = metadata.copyWith();
  on.refreshOriginals();
  _originalOn = on.copyWith();
  dimming.refreshOriginals();
  _originalDimming = dimming.copyWith();
  dimmingDelta?.refreshOriginals();
  _originalDimmingDelta = dimmingDelta?.copyWith();
  colorTemperature.refreshOriginals();
  _originalColorTemperature = colorTemperature.copyWith();
  colorTemperatureDelta?.refreshOriginals();
  _originalColorTemperatureDelta = colorTemperatureDelta?.copyWith();
  color.refreshOriginals();
  _originalColor = color.copyWith();
  dynamics.refreshOriginals();
  _originalDynamics = dynamics.copyWith();
  alert.refreshOriginals();
  _originalAlert = alert.copyWith();
  gradient.refreshOriginals();
  _originalGradient = gradient.copyWith();
  effects.refreshOriginals();
  _originalEffects = effects.copyWith();
  timedEffects.refreshOriginals();
  _originalTimedEffects = timedEffects.copyWith();
  powerUp.refreshOriginals();
  _originalPowerUp = powerUp.copyWith();
  super.refreshOriginals();
}