flutter_confetti icon indicating copy to clipboard operation
flutter_confetti copied to clipboard

Single burst

Open HofmannZ opened this issue 5 years ago • 2 comments

It would be nice to have the ability to shoot just one burst of particles upon calling .play. Alternatively, this could be introduced under a new method in the controller called .playSingle or .playOnce.

HofmannZ avatar Oct 12 '20 12:10 HofmannZ

I agree that this would be nice. For now, you can set emissionFrequency: 0, which with the current code ensures a single burst (at least as far as I can tell by inspecting the code base).

olof-dev avatar Nov 09 '20 13:11 olof-dev

What @olof-dev says is correct. It will always play on the first frame, regardless of the emissionFrequence. And from there it should last for whatever time the duration is set to, with respect to the frequency. Play single or something similar is a good idea, and I'll add it in the future.

funwithflutter avatar Jan 04 '21 22:01 funwithflutter