From 35c15da9d6b0c538a0bed8e0bb8a0505238263ac Mon Sep 17 00:00:00 2001 From: suragch Date: Sat, 1 May 2021 07:06:50 +0800 Subject: [PATCH] use a rounded stroke cap --- lib/audio_video_progress_bar.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/audio_video_progress_bar.dart b/lib/audio_video_progress_bar.dart index 19ceb55..ebddc34 100644 --- a/lib/audio_video_progress_bar.dart +++ b/lib/audio_video_progress_bar.dart @@ -656,6 +656,7 @@ class _RenderProgressBar extends RenderBox { void _drawBaseBar(Canvas canvas, Size localSize) { final baseBarPaint = Paint() ..color = baseBarColor + ..strokeCap = StrokeCap.round ..strokeWidth = barHeight; final startPoint = Offset(0, localSize.height / 2); var endPoint = Offset(localSize.width, localSize.height / 2); @@ -665,6 +666,7 @@ class _RenderProgressBar extends RenderBox { void _drawBufferedBar(Canvas canvas, Size localSize) { final bufferedBarPaint = Paint() ..color = bufferedBarColor + ..strokeCap = StrokeCap.round ..strokeWidth = barHeight; final bufferedWidth = _proportionOfTotal(_buffered) * localSize.width; final startPoint = Offset(0, localSize.height / 2); @@ -675,6 +677,7 @@ class _RenderProgressBar extends RenderBox { void _drawCurrentProgressBar(Canvas canvas, Size localSize) { final progressBarPaint = Paint() ..color = progressBarColor + ..strokeCap = StrokeCap.round ..strokeWidth = barHeight; final progressWidth = _proportionOfTotal(_progress) * localSize.width; final startPoint = Offset(0, localSize.height / 2);