IntervalDuration class

A custom curve that allows for an interval-based animation with a specific duration.

This class extends the Curve class and can be used to define a custom animation curve that operates within a specific interval of the animation timeline.

Example usage:

AnimationController controller = AnimationController(
  duration: const Duration(seconds: 2),
  vsync: this,
);

Animation<double> animation = CurvedAnimation(
  parent: controller,
  curve: IntervalDuration(),
);

This is useful for creating animations that only play during a specific portion of the overall animation duration.

Inheritance

Constructors

IntervalDuration({Duration? start, Duration? end, required Duration duration, Curve? curve})
Creates a curve interval with a specific duration.
const
IntervalDuration.delayed({Duration? startDelay, Duration? endDelay, required Duration duration})
Creates an IntervalDuration with a delay.
factory

Properties

curve Curve?
final
duration Duration
final
end Duration?
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 setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start Duration?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
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.
override