Scene constructor
Scene({
- required ResourceType type,
- required String id,
- String idV1 = "",
- required List<
SceneAction> actions, - required SceneRecall recall,
- required SceneMetadata metadata,
- required Relative group,
- required ScenePalette palette,
- required double speed,
- 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;