liquid_progress_indicator icon indicating copy to clipboard operation
liquid_progress_indicator copied to clipboard

Stop animation

Open AhmedAlbashaDev opened this issue 4 years ago • 3 comments

How to stop the animation when I reach the value suppose 70%

AhmedAlbashaDev avatar Aug 17 '20 12:08 AhmedAlbashaDev

Looking forward to this issue

luis-cruzt avatar Aug 20 '20 04:08 luis-cruzt

That would be great, any plans on adding this feature?

loonix avatar Aug 27 '20 11:08 loonix

You can stop the animation like below.

@override void initState() { super.initState(); _animationController = AnimationController( vsync: this, duration: Duration(seconds: 10), );

_animationController.addListener(() => setState(() {
  _animationController.value > 0.7 ? _animationController.stop() : _animationController.repeat();
}));
_animationController.repeat();

}

idrisyagci avatar Dec 03 '20 21:12 idrisyagci