fit method

  1. @override
void fit(
  1. double distance
)
override

Tells this timeline how far its progress will carry, for one paced by speed. Composites pass it to their children; the rest ignore it.

Implementation

@override
void fit(double distance) {
  if (distance > 0) {
    _child = DurationTimeline(distance / speed, curve);
  } else {
    // A zero distance can't drive a curve; treat it as already finished.
    _child = const TerminalTimeline();
  }
}