bluemix / Gradient-Widgets

Flutter widgets wrapped with gradients
Apache License 2.0
348 stars 48 forks source link

No way to set background of GradientProgressIndicator #17

Open muhammadidrees opened 4 years ago

saigkl commented 4 years ago

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

bluemix commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

bluemix commented 4 years ago

@muhammadidrees Ok, take your time...

arielbh commented 4 years ago

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 https://github.com/bluemix/Gradient-Widgets/pull/19

bluemix commented 3 years ago

dear @arielbh,

19 has conflicts

nohkumado commented 2 years ago

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....