From 397f887b91cac7a5a3a56d951807ce052291e2e9 Mon Sep 17 00:00:00 2001 From: dom Date: Mon, 19 Jan 2026 12:21:25 +0800 Subject: [PATCH] fix video progress indicator Signed-off-by: dom --- .../progress_bar/video_progress_indicator.dart | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/common/widgets/progress_bar/video_progress_indicator.dart b/lib/common/widgets/progress_bar/video_progress_indicator.dart index 4cc1a844e..6c3d15424 100644 --- a/lib/common/widgets/progress_bar/video_progress_indicator.dart +++ b/lib/common/widgets/progress_bar/video_progress_indicator.dart @@ -135,23 +135,22 @@ class RenderProgressBar extends RenderBox { final radius = Radius.circular(_radius); final rect = Rect.fromLTWH(0, 0, size.width, size.height); + final rrect = RRect.fromRectAndCorners( + rect, + bottomLeft: radius, + bottomRight: radius, + ); if (progress == 0) { - canvas.drawRRect( - .fromRectAndCorners(rect, bottomLeft: radius, bottomRight: radius), - paint..color = _backgroundColor, - ); + canvas.drawRRect(rrect, paint..color = _backgroundColor); } else if (progress == 1) { - canvas.drawRRect( - .fromRectAndCorners(rect, bottomLeft: radius, bottomRight: radius), - paint..color = _color, - ); + canvas.drawRRect(rrect, paint..color = _color); } else { final w = size.width * progress; final left = Rect.fromLTWH(0, 0, w, size.height); final right = Rect.fromLTWH(w, 0, size.width - w, size.height); canvas - ..clipRRect(.fromRectAndRadius(rect, radius)) + ..clipRRect(rrect) ..drawRect(left, paint..color = _color) ..drawRect(right, paint..color = _backgroundColor); }