ParticlesFly constructor
const
ParticlesFly({
- Key? key,
- required double height,
- required double width,
- double lineStrokeWidth = 0.5,
- bool onTapAnimation = true,
- double numberOfParticles = 400,
- double speedOfParticles = 2,
- double awayRadius = 200,
- bool isRandomColor = false,
- Color particleColor = Colors.purple,
- Duration awayAnimationDuration = const Duration(milliseconds: 100),
- double maxParticleSize = 4,
- bool isRandSize = false,
- List<
Color> randColorList = const [Colors.orange, Colors.blue, Colors.teal, Colors.red, Colors.purple], - Curve awayAnimationCurve = Curves.easeIn,
- bool enableHover = false,
- Color hoverColor = Colors.orangeAccent,
- double hoverRadius = 80,
- bool connectDots = false,
- Color lineColor = const Color.fromARGB(90, 155, 39, 176),
A Flutter package to create a particle animation like the one on the website https://vincentgarreau.com/particles.js/
Implementation
const ParticlesFly({
super.key,
required this.height,
required this.width,
this.lineStrokeWidth = 0.5,
this.onTapAnimation = true,
this.numberOfParticles = 400,
this.speedOfParticles = 2,
this.awayRadius = 200,
this.isRandomColor = false,
this.particleColor = Colors.purple,
this.awayAnimationDuration = const Duration(milliseconds: 100),
this.maxParticleSize = 4,
this.isRandSize = false,
this.randColorList = const [
Colors.orange,
Colors.blue,
Colors.teal,
Colors.red,
Colors.purple,
],
this.awayAnimationCurve = Curves.easeIn,
this.enableHover = false,
this.hoverColor = Colors.orangeAccent,
this.hoverRadius = 80,
this.connectDots = false,
this.lineColor = const Color.fromARGB(90, 155, 39, 176),
});