flutter_shimmer icon indicating copy to clipboard operation
flutter_shimmer copied to clipboard

Delay between shimmers

Open joj3000 opened this issue 3 years ago • 5 comments

Hi, I've tried a bunch of different stuff in a lot of places and i can't figure out how to set a delay between two shimmer animations, instead of the animation to starts over once it's finished. Any idea how to achieve this ?

Thanks a lot for your help, and for your awesome package !

joj3000 avatar Jul 08 '20 04:07 joj3000

Definitely very interested in this feature as well

theweiweiway avatar Aug 10 '20 15:08 theweiweiway

You just have to use period function cleverly.

//assuming you are generating a listview of shimmer records as placeholder //each record has an index

Shimmer.fromColors(,
                period: Duration(milliseconds: 800 + (index * 100)),
                child: ...
              );

fadhlisulaimi avatar Sep 24 '20 04:09 fadhlisulaimi

Hello, i'm interested in this feature too, in my case, i want to loop the shammer animation to make my component shines every x seconds Do you think we could get it ? Thanks in advance !

Near0ne avatar Nov 20 '20 09:11 Near0ne

I submitted a pull request #41 with this feature. You can use my fork in the meantime, in case it's not merged soon.

shimmer:
  git: 
     url: https://github.com/jinyus/flutter_shimmer

jinyus avatar Jan 08 '21 05:01 jinyus

I just used this and it worked great. Wonder why this feature is not yet in the pub.dev package?

Kerandon avatar Mar 24 '23 07:03 Kerandon