We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9395d54 commit bf813b6Copy full SHA for bf813b6
lib/src/progress_bar.dart
@@ -266,7 +266,7 @@ extension RelativePositionExtensions on BuildContext {
266
if (globalPosition == null) return null;
267
final box = findRenderObject()! as RenderBox;
268
final Offset tapPos = box.globalToLocal(globalPosition);
269
- final double relative = tapPos.dx / box.size.width;
+ final double relative = (tapPos.dx / box.size.width).clamp(0, 1);
270
final Duration position = videoDuration * relative;
271
return position;
272
}
0 commit comments