Added feature to hide the shimmer effect#32
Conversation
|
Looks good to me |
|
@hnvn I wonder if you could review this and possibly merge it as I think it's a much needed feature. Cheers. |
|
@hnvn can you please merge this? |
|
In case someone else comes to this topic and wants an alternative solution to waiting for the feature, they could create the logic in a widget and use that as a shimmer wrapper: |
I'm having issues with this approach because whenever there's a change in the loading state, the child component gets destroyed and rebuilt. So, if in the given flow you need to change the loading value, the child’s initState will always be called. |
This is practically the same request as #12. I think it will come in handy for a lot of developers to have the ability to remove all gradient blending and just draw the child. A simple use case is to have a Card UI that shimmers while loading and reveals the text content once loaded.
How to:
Set
hideOnDisabledtotrueto hide the shimmer effect whenenabledisfalse.