Skip to content

Commit

Permalink
use a rounded stroke cap
Browse files Browse the repository at this point in the history
  • Loading branch information
suragch committed Apr 30, 2021
1 parent 7e0fdb3 commit 35c15da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/audio_video_progress_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 35c15da

Please sign in to comment.