Unified pure-function interpolation engine for all morph transitions.
Replaces duplicated logic previously spread across CardMorphTween and
RectMorphTween. All methods are static, side-effect free, and
deterministic: visualProperty = f(progress).
progress 0.0 represents the source/collapsed state.
progress 1.0 represents the target/expanded state.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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 -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
lerp(
double progress, double a, double b) → double -
Linear interpolation between
aandbatprogress(clamped). -
morphBlur(
double progress, {double maxBlur = 6.0}) → double - Background blur sigma.
-
morphElevation(
double progress, {double startElevation = 4.0, double peakElevation = 16.0, double endElevation = 0.0}) → double - Shadow elevation that peaks mid-transition for a lift effect.
-
morphHeight(
double progress, double startHeight, double endHeight) → double - Interpolated height.
-
morphLeft(
double progress, double startLeft, double endLeft) → double - Interpolated left position.
-
morphRadius(
double progress, {double startRadius = 16.0, double endRadius = 0.0}) → double -
Interpolated corner radius from
startRadius→endRadius. -
morphRect(
double progress, Rect start, Rect end) → Rect -
Interpolated rect from
starttoendatprogress. -
morphScale(
double progress, {double minScale = 0.95}) → double - Background scale (slight zoom-out as the overlay rises).
-
morphScrim(
double progress, {double maxOpacity = 0.5}) → double - Scrim (barrier) opacity behind the morphing container.
-
morphTop(
double progress, double startTop, double endTop) → double - Interpolated top position.
-
morphWidth(
double progress, double startWidth, double endWidth) → double - Interpolated width.
-
sourceContentOpacity(
double progress, {double fadeStart = 0.0, double fadeEnd = 0.4}) → double - Opacity of the source/collapsed content.
-
targetContentOpacity(
double progress, {double fadeStart = 0.35, double fadeEnd = 0.7}) → double - Opacity of the target/expanded content.