BlobButton.bouncing constructor
BlobButton.bouncing({
- Key? key,
- required GestureTapCallback onTap,
- required Icon icon,
- Color? backgroundColor,
Implementation
factory BlobButton.bouncing({
Key? key,
required GestureTapCallback onTap,
required Icon icon,
Color? backgroundColor,
}) {
Size area = const Size(100, 100);
List<Particle> blobs = [];
for (int i = 0; i < 8; i++) {
blobs.add(RotatingParticle.random(area));
}
return BlobButton._(
key: key,
backgroundColor: backgroundColor,
onTap: onTap,
blobs: blobs,
size: area,
icon: icon,
);
}