curved method

ScrollTransitionPhase curved(
  1. Curve curve
)

Returns this phase with its magnitude reshaped by curve. The sign stays the same.

Implementation

ScrollTransitionPhase curved(Curve curve) {
  if (value == 0 || identical(curve, Curves.linear)) return this;
  return ScrollTransitionPhase(
    value.sign * curve.transform(value.abs().clamp(0.0, 1.0)),
  );
}