Scene constructor

Scene({
  1. required ResourceType type,
  2. required String id,
  3. String idV1 = "",
  4. required List<SceneAction> actions,
  5. required SceneRecall recall,
  6. required SceneMetadata metadata,
  7. required Relative group,
  8. required ScenePalette palette,
  9. required double speed,
  10. required bool autoDynamic,
})

Creates a Scene object.

Implementation

Scene({
  required super.type,
  required super.id,
  this.idV1 = "",
  required this.actions,
  required this.recall,
  required this.metadata,
  required this.group,
  required this.palette,
  required double speed,
  required this.autoDynamic,
})  : assert(idV1.isEmpty || Validators.isValidIdV1(idV1),
          '"$idV1" is not a valid `idV1`'),
      assert(Validators.isUnitInterval(speed),
          "`speed` must be between 0 and 1 (inclusive) "),
      _originalActions = actions.map((action) => action.copyWith()).toList(),
      _originalRecall = recall.copyWith(),
      _originalMetadata = metadata.copyWith(),
      _originalSpeed = speed,
      _originalPalette = palette.copyWith(),
      _speed = speed,
      _originalAutoDynamic = autoDynamic;