Created
October 25, 2019 11:47
-
-
Save av/088b0c603f3256636a26e8546c47b8cc to your computer and use it in GitHub Desktop.
Flutter: magic, curved burst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in Burst constructor, children.map(...) | |
// ... | |
(particle) => CurvedParticle( | |
curve: Interval( | |
// Interval would start at random point from 0 to 0.5 | |
// and finish at random point between 0.6 and 1.0 | |
Randoms.rnd.nextDouble() * .5, | |
Randoms.rnd.nextDouble() * .4 + .6, | |
), | |
child: MovingParticle( | |
from: Offset.zero, | |
to: Randoms.offsetFromSize(size), | |
child: particle, | |
), | |
), | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment