Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round vs square caps on the progress bar ends #20

Closed
marcojr opened this issue Aug 10, 2021 · 5 comments
Closed

Round vs square caps on the progress bar ends #20

marcojr opened this issue Aug 10, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@marcojr
Copy link

marcojr commented Aug 10, 2021

on the examples at /~https://github.com/suragch/audio_video_progress_bar , the progress bar has no border radius

deep_purple_theme

however when executing, take a look...

Screenshot 2021-08-10 at 01 16 48

It places the border of the progress bar with radius. Is there some how to control it ? I can't find anything on the doc.

I really wish to set my progress bar as it seens on the github pag, I mean: borderRadius = 0 on progress bar.

@suragch
Copy link
Owner

suragch commented Aug 10, 2021

Yes, that used to be the default and I haven't updated the pictures yet.

Currently there is no way to change whether the bar is round or not. I'll leave this issue open and if enough people upvote it then I'll add an option for it.

The easiest way for you to solve your problem right now, though, is to just copy the source code to your project and delete the following line from the _drawBar method:

..strokeCap = StrokeCap.round

I think that will solve it but you might need to adjust the width measurements, too. I forget if the stroke cap changed the width any.

@suragch suragch added the enhancement New feature or request label Aug 10, 2021
@suragch suragch changed the title No BorderRadius Control ? Round vs square caps on the progress bar Aug 10, 2021
@suragch suragch changed the title Round vs square caps on the progress bar Round vs square caps on the progress bar ends Aug 10, 2021
@enseitankad0
Copy link

I will be grateful if you could implement this enhancement. Thanks in advance!

@marcojr
Copy link
Author

marcojr commented Aug 10, 2021

thanks, @suragch ! Yes, it could be nice to allow users to choose ;)

@suragch
Copy link
Owner

suragch commented Aug 12, 2021

Version 0.9.0 adds this functionality.

barCapShape: BarCapShape.square,
/// The shape of the progress bar at the left and right ends.
enum BarCapShape {
  /// The left and right ends of the bar are round.
  round,

  /// The left and right ends of the bar are square.
  square,
}

If you find any problems with it feel free to reopen this issue or create a new one.

@suragch suragch closed this as completed Aug 12, 2021
@enseitankad0
Copy link

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants