Transition class final
How two adjacent scenes blend at their boundary.
A transition is pure authoring data — one value class for every kind, with the variant parameter non-null exactly for its own kind:
Transition.cut()
Transition.crossFade(0.5.seconds, overlap: true)
Transition.wipe(0.4.seconds, direction: Edge.right)
Transition.zoom(0.6.seconds, into: Alignment.center)
Transition.slide(0.4.seconds, from: Edge.right)
overlap controls timing: true means the two scenes share the blend
window and the total video shortens by duration; false means each
scene plays its full length and the blend overlays the incoming scene's
first frames while the outgoing is held at its final frame.
- Annotations
Constructors
- Transition.crossFade(Time duration, {bool overlap = true, Curve ease = Ease.linear})
-
A dissolve lasting
duration: the incoming scene fades in over the outgoing one, with no dip to the background in between.const - Transition.cut()
-
A hard cut: zero duration, no overlap, no blend window at all.
const
- Transition.slide(Time duration, {Edge? from = Edge.right, bool overlap = true, Curve ease = Ease.linear})
-
A push lasting
duration: the incoming scene slides in from thefromedge while the outgoing slides off toward the opposite one.const - Transition.wipe(Time duration, {Edge? direction = Edge.right, bool overlap = true, Curve ease = Ease.linear})
-
A reveal lasting
durationwhose front travels towarddirection:Edge.rightuncovers the incoming scene left-to-right.const - Transition.zoom(Time duration, {Alignment? into = Alignment.center, bool overlap = true, Curve ease = Ease.linear})
-
A zoom lasting
duration: the outgoing scene scales up anchored atintowhile fading out over the incoming one.const
Properties
- direction → Edge?
-
The direction of travel of a TransitionKind.wipe front;
nullfor every other kind.final - duration → Time
-
How long the blend window lasts. Must be absolute (frames, seconds, or
ms): a boundary sits between two scenes, so a relative duration is
ambiguous and rejected at resolution time.
final
- ease → Curve
-
The easing applied to the blend progress; defaults to Ease.linear (a
plain dissolve reads linear — opinionated motion is one parameter away).
final
- from → Edge?
-
The edge a TransitionKind.slide pushes in from;
nullfor every other kind.final - hashCode → int
-
The hash code for this object.
no setteroverride
- into → Alignment?
-
The anchor a TransitionKind.zoom scales into;
nullfor every other kind.final - kind → TransitionKind
-
Which blend this transition performs.
final
- overlap → bool
-
Whether the two scenes share the blend window.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
The factory-call form, omitting ease: curve singletons have no stable
textual form, and identity equality makes one up unhelpful.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override