GroupedLight constructor

GroupedLight({
  1. required ResourceType type,
  2. required String id,
  3. String idV1 = "",
  4. required Relative owner,
  5. required LightOn on,
  6. required LightDimming dimming,
  7. LightDimmingDelta? dimmingDelta,
  8. LightPowerUpColorColorTemperature? colorTemperature,
  9. LightColorTemperatureDelta? colorTemperatureDelta,
  10. LightColorXy? xy,
  11. required LightAlert alert,
  12. int? durationMilliseconds,
})

Creates a GroupedLight object.

Implementation

GroupedLight({
  required super.type,
  required super.id,
  this.idV1 = "",
  required this.owner,
  required this.on,
  required this.dimming,
  this.dimmingDelta,
  this.colorTemperature,
  this.colorTemperatureDelta,
  this.xy,
  required this.alert,
  int? durationMilliseconds,
})  : assert(idV1.isEmpty || Validators.isValidIdV1(idV1),
          '"$idV1" is not a valid `idV1`'),
      assert(durationMilliseconds == null || durationMilliseconds >= 0,
          "`durationMilliseconds` must be greater than 0"),
      _originalOn = on.copyWith(),
      _originalDimming = dimming.copyWith(),
      _originalDimmingDelta = dimmingDelta?.copyWith(),
      _originalColorTemperature = colorTemperature?.copyWith(),
      _originalColorTemperatureDelta = colorTemperatureDelta?.copyWith(),
      _originalXy = xy?.copyWith(),
      _originalAlert = alert.copyWith(),
      _originalDurationMilliseconds = durationMilliseconds;