progressForPhase method

double progressForPhase(
  1. SplashPhase phase,
  2. double timelineProgress, {
  3. Curve curve = Curves.linear,
})

Implementation

double progressForPhase(
  SplashPhase phase,
  double timelineProgress, {
  Curve curve = Curves.linear,
}) {
  final bounds = _boundsForPhase(phase);
  final raw = ((timelineProgress - bounds.$1) / (bounds.$2 - bounds.$1))
      .clamp(0.0, 1.0)
      .toDouble();
  return curve.transform(raw);
}