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

No way to set background of GradientProgressIndicator #17

Open
muhammadidrees opened this issue Apr 9, 2020 · 13 comments
Open

No way to set background of GradientProgressIndicator #17

muhammadidrees opened this issue Apr 9, 2020 · 13 comments

Comments

@muhammadidrees
Copy link

No description provided.

@saigkl
Copy link

saigkl commented Apr 14, 2020

Facing the same issue, It'd be useful if you add this feature.

@bluemix
Copy link
Owner

bluemix commented Apr 15, 2020

Hello 👋🏼,
can you please explain what do you mean by a background to the GradientProgressIndicator?
the item must have colors depending on its gradient.

@saigkl
Copy link

saigkl commented Apr 15, 2020

Hey,

The default widget LinearProgressIndicator has a property called backgroundColor, which will help us to change the track colour.

What happens now is the begin gradient colour is automatically applied as the track colour.

@bluemix
Copy link
Owner

bluemix commented Apr 15, 2020

because it it should represent the colors of the gradient assigned to to, otherwise, where will the gradient colors go to the progress?

What happens now is the begin gradient colour is automatically applied as the track colour.

in this case, you can change the begin gradient color to change the background of the progress.

@muhammadidrees
Copy link
Author

All this does is uses two colours for the progress bar but what I’m asking for is a separate background colour and the gradient only for the progress.

This is wanted:
3C261122-942C-4841-8713-012FA7B18924

This is what happens right now:
D54F5804-BE8B-44B3-ACF0-3E25768A1C22

Sorry for the image quality hope it sets the point across.

P.S. I did a work around in your code and achieved what I wanted can share the code with you if you’re interested 🙃

@bluemix
Copy link
Owner

bluemix commented Apr 16, 2020

This is wanted:
3C261122-942C-4841-8713-012FA7B18924

LinearProgressIndicator should have a background color because it has the progress color and the background color. GradientProgressIndicator here has a background color, but as you can see it is outside of the gradient colors. Second, there need to be color matching between the gradient colors and the background color in order to have a good UI.

P.S. I did a work around in your code and achieved what I wanted can share the code with you if you’re interested 🙃

I'll stick with my options. thanks 😀

@muhammadidrees
Copy link
Author

But still, I'll say that a package should be flexible enough to be customized as per all use cases and having a background color behind the progress bar (even outside the gradient) is a common use case.

I'll stick with my options. thanks 😀

No problem. :)

@bluemix
Copy link
Owner

bluemix commented Apr 18, 2020

if as you would suggest, the library should be flexible, can you please make a pull request for this feature so that I can test it? @muhammadidrees

@muhammadidrees
Copy link
Author

Sure just give me some time I'll get to it as soon as I am free. @bluemix

@bluemix
Copy link
Owner

bluemix commented Apr 22, 2020

@muhammadidrees Ok, take your time...

@arielbh
Copy link

arielbh commented Jul 9, 2020

Sorry to barge into your little conversation.
I've also needed this feature and created a PR.
@bluemix let me know what you think.
cc: @muhammadidrees
#19

@bluemix
Copy link
Owner

bluemix commented Apr 2, 2021

dear @arielbh,
#19 has conflicts

@nohkumado
Copy link

and also having a more than 2 color gradient would be nice!
but is this dead? in the meanwhile i will try the fork of arielbh....

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

No branches or pull requests

5 participants