ParticlesFly class

Inheritance

Constructors

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/
const

Properties

awayAnimationCurve Curve
The curve of the animation when the particles move away from the mouse
final
awayAnimationDuration Duration
The duration of the animation when the particles move away from the mouse
final
awayRadius double
The radius of the circle from which the particles move away when the mouse is hovered over them
final
connectDots bool
If true, the particles will be connected by lines
final
enableHover bool
If true, the particles will have a hover effect
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the widget
final
hoverColor Color
The color of the particles when hovered over
final
hoverRadius double
The radius of the circle from which the particles move away when the mouse is hovered over them
final
isRandomColor bool
If true, the particles will have random colors
final
isRandSize bool
If true, the particles will have random sizes
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lineColor Color
The color of the lines
final
lineStrokeWidth double
The width of the lines
final
maxParticleSize double
The maximum size of the particles
final
numberOfParticles double
The number of particles to be displayed
final
onTapAnimation bool
If true, the particles will move away from the mouse when hovered over or tapped
final
particleColor Color
The color of the particles
final
randColorList List<Color>
The list of colors from which the particles will have random colors
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
speedOfParticles double
The speed of the particles
final
width double
The width of the widget
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() ParticlesFlyState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited