Scene class final

A time-bounded section of a video — the single source of truth for everything inside it.

A scene must have a length: duration is required, and the type system (not a runtime assert) enforces it. The Video parent owns the running offsets and mounts a SceneScope above each scene, so a Scene renders only its content: a Stack aligned to the canvas center — video framing convention, so a bare Text child reads well without layout boilerplate.

Scenes are not standalone widgets: outside a Video there is no time scope to resolve against, and building one throws a FluvieTimingError.

Inheritance
Available extensions

Constructors

Scene({required Time duration, Background? background, List<Widget> children = const [], Defaults? motionDefaults, List<Audio> audio = const [], Transition? enter, Transition? exit, Camera? camera, Key? key})
Creates a scene lasting duration showing children on its canvas, optionally over a static background.
const
Scene.centered({required Time duration, required Widget child, Background? background, Defaults? motionDefaults, List<Audio> audio = const [], Transition? enter, Transition? exit, Camera? camera, Key? key})
A single-child convenience: child mounted centered on the canvas — children: [Center(child: child)], nothing more.
Scene.sequence({required TimelineSchedule timeline, Background? background, List<Widget> children = const [], Defaults? motionDefaults, List<Audio> audio = const [], Transition? enter, Transition? exit, Camera? camera, Key? key})
A scene whose duration comes from a TimelineSchedule — the scene lasts exactly as long as the schedule it hosts.
factory

Properties

audio List<Audio>
Audio tracks scoped to this scene — authoring data the audio pipeline mounts at render.
final
background Background?
The static backdrop behind children, or null for none. It is simply the first Stack child — the same Background widget works as an animated, anchored child in children instead (the gradient shift).
final
camera Camera?
The scene-wide camera move, or null for a static frame.
final
children List<Widget>
The scene's content, stacked in declaration order and aligned to the canvas center.
final
duration Time
How long the scene lasts. Must be absolute (frames, seconds, or ms): scene durations define the video length, so a relative duration would be a fraction of itself.
final
enter Transition?
The transition this scene wants on the boundary it enters across.
final
exit Transition?
The transition this scene wants on the boundary it exits across.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
motionDefaults Defaults?
Scene-level animation defaults, layered between each element's own defaults and the video's; null inherits unchanged.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

animate(List<Animation> animations, {Anchor? anchor, TimeRange? window, Defaults? defaults}) Widget

Available on Widget, provided by the Animate extension

Binds animations to this widget by wrapping it in a MotionTarget.
build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
show({Time? from, Time? to}) Widget

Available on Widget, provided by the Animate extension

Visibility-window sugar: animate([], window: from.to(to)) with from defaulting to the window start and to to its end.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited