ScaleRamp class
One zone of a ScaleResponse. Maps a normalized progress (0..1
across that zone's drag travel) to a scale factor that ends at
end via curve. The zone's start value is implicit (taken
from the prior zone's end, or 1.0 at base for the first zone)
so consecutive ramps are guaranteed continuous.
Reference frame: end is always relative to baseWidth, never
to the previous zone's end. So pastDisplay: ScaleRamp(end: 0.2)
means "at full past-display, rect.width = 0.2 × baseWidth"
regardless of what inDisplay.end was. This keeps the API
declarative — each ramp's end is the absolute target the rect
reaches at the end of that zone's drag.
Consequences:
pastDisplay.end < inDisplay.end→ continued shrinking past edge (the usual case).pastDisplay.end > inDisplay.end→ rect grows back from edge state during past-display drag (valid; sometimes a useful effect).end > 1.0→ grows the rect;end < 1.0→ shrinks. Both fine.
Properties
- curve → Curve
-
Shape of the ramp from the implicit start value to end.
final
- end → double
-
Scale factor at progress=1 of this zone — absolute multiplier on
baseWidth (not on the previous zone's end). See class doc.
final
- 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