between<T> static method

Between<T> between<T>({
  1. BetweenInterval weight = BetweenInterval.linear,
  2. (Curve, Curve)? curve,
  3. required List<T> steps,
})

Implementation

static Between<T> between<T>({
  BetweenInterval weight = BetweenInterval.linear,
  (Curve, Curve)? curve,
  required List<T> steps,
}) =>
    Between.constant(
      begin: steps.first,
      end: steps.last,
      onLerp: BetweenInterval._link(
        totalStep: steps.length,
        step: (i) => steps[i],
        interval: (i) => weight,
      ),
      curve: curve,
    );