IntervalDuration class

A custom curve that creates time-based intervals within an animation duration.

IntervalDuration allows you to create animations that start after a delay or end before the full duration completes, using actual Duration values instead of normalized progress values (0.0-1.0).

This is particularly useful for staggered animations or when you need precise timing control based on real time intervals rather than animation progress percentages.

Example:

// Animation that starts after 500ms delay and ends 200ms early
IntervalDuration(
  start: Duration(milliseconds: 500),
  end: Duration(milliseconds: 1800), // out of 2000ms total
  duration: Duration(milliseconds: 2000),
  curve: Curves.easeInOut,
);
Inheritance

Constructors

IntervalDuration({Duration? start, Duration? end, required Duration duration, Curve? curve})
Creates an IntervalDuration curve with explicit timing intervals.
const
IntervalDuration.delayed({Duration? startDelay, Duration? endDelay, required Duration duration})
Creates an IntervalDuration with delay-based timing.
factory

Properties

curve → Curve?
Optional curve to apply to the active portion of the animation.
final
duration → Duration
The total duration of the animation timeline.
final
end → Duration?
The duration at which the animation should end.
final
flipped → Curve
Returns a new curve that is the reversed inversion of this one.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
start → Duration?
The duration after which the animation should start.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
transform(double t) → double
Returns the value of the curve at point t.
override
transformInternal(double t) → double
Returns the value of the curve at point t.
inherited

Operators

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