progressForPhase method
double
progressForPhase(
- SplashPhase phase,
- double timelineProgress, {
- 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);
}