hnvn / flutter_shimmer

A package provides an easy way to add shimmer effect in Flutter project
BSD 3-Clause "New" or "Revised" License
1.77k stars 200 forks source link

Show/hide shimmer effect #47

Open subzero911 opened 3 years ago

subzero911 commented 3 years ago

Expected behaviour - when enabled: false, hide shimmer effect but show children Current behaviour - stops the animation. Because of it I have to create 2 trees - a shimmer tree with fake widgets and a tree with actual widgets image

Please consider using enabled to show/hide shimmering, and period: 0 is for stopping the animation

subzero911 commented 3 years ago

Or I'd suggest to deprecate parameter enabled as non-obvious, and introduce visible: true/false and animation: true/false instead.

CripyIce commented 3 years ago

@subzero911 I vote for that, really confusing and make you double the widgets.

adschi commented 2 years ago

any updates on this?

mdmota commented 2 years ago

this feature would be too much. stop animation doesn't make much sense.

subzero911 commented 1 year ago

this feature would be too much. stop animation doesn't make much sense.

I am agree with this point. Then let's return to the idea I suggested in a start post. Rename enabled to visible and make use it to show/hide shimmer effect and those people who wants to stop animation for some reason will use period: 0.