SmartScene constructor

SmartScene({
  1. required ResourceType type,
  2. required String id,
  3. String idV1 = "",
  4. required SmartSceneMetadata metadata,
  5. required Relative group,
  6. required List<SmartSceneWeek> weekTimeslots,
  7. required SmartSceneActiveTimeslot activeTimeslot,
  8. required String state,
  9. String? recallAction,
})

Creates a SmartScene object.

Implementation

SmartScene({
  required super.type,
  required super.id,
  this.idV1 = "",
  required this.metadata,
  required this.group,
  required this.weekTimeslots,
  required this.activeTimeslot,
  required this.state,
  this.recallAction,
})  : assert(idV1.isEmpty || Validators.isValidIdV1(idV1),
          '"$idV1" is not a valid `idV1`'),
      _originalMetadata = metadata.copyWith(),
      _originalWeekTimeslots = weekTimeslots
          .map((weekTimeslot) => weekTimeslot.copyWith())
          .toList(),
      _originalRecallAction = recallAction;