rawProgress property
double
get
rawProgress
The raw (uneased) progress of the animation, bounded strictly between 0.0 and 1.0.
Implementation
double get rawProgress {
if (status == AnimationStatus.dismissed) return 0.0;
if (status == AnimationStatus.completed) return 1.0;
final stopwatch = _stopwatch;
if (stopwatch == null) return _startProgress;
final elapsed = stopwatch.elapsedMilliseconds - _transitionStartTimeMs;
if (status == AnimationStatus.forward) {
if (duration.inMilliseconds <= 0) return 1.0;
return (_startProgress + (elapsed / duration.inMilliseconds)).clamp(
0.0,
1.0,
);
} else if (status == AnimationStatus.reverse) {
if (duration.inMilliseconds <= 0) return 0.0;
return (_startProgress - (elapsed / duration.inMilliseconds)).clamp(
0.0,
1.0,
);
}
return _startProgress;
}