|
|
@@ -146,9 +146,10 @@ class _ProgressBarPainter extends CustomPainter {
|
|
|
if (!value.initialized) {
|
|
|
return;
|
|
|
}
|
|
|
- final double playedPart = value.position.inMilliseconds /
|
|
|
- value.duration.inMilliseconds *
|
|
|
- size.width;
|
|
|
+ final double playedPartPercent = value.position.inMilliseconds /
|
|
|
+ value.duration.inMilliseconds;
|
|
|
+ final double playedPart = playedPartPercent > 1? size.width
|
|
|
+ : playedPartPercent * size.width;
|
|
|
for (DurationRange range in value.buffered) {
|
|
|
final double start = range.startFraction(value.duration) * size.width;
|
|
|
final double end = range.endFraction(value.duration) * size.width;
|