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() {
  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();
  xy?.refreshOriginals();
  _originalXy = xy?.copyWith();
  alert.refreshOriginals();
  _originalAlert = alert.copyWith();
  _originalDurationMilliseconds = durationMilliseconds;
  super.refreshOriginals();
}