buildAnimation method

CurveTween buildAnimation({
  1. required Duration totalDuration,
  2. Curve? curve,
})

Builds a sub-animation based on the properties of this entry.

Implementation

CurveTween buildAnimation({
  required Duration totalDuration,
  Curve? curve,
}) {
  int beginT = begin.inMicroseconds, endT = end.inMicroseconds;
  return CurveTween(
    curve: Interval(beginT / totalDuration.inMicroseconds,
        endT / totalDuration.inMicroseconds,
        curve: curve ?? this.curve),
  );
}