ParticleFlow class

High-performance configurable particle system.

Inheritance

Constructors

ParticleFlow({Key? key, required int count, ParticleBehavior behavior = const ParticleBehavior.snow(), ParticleSpawnConfig spawnConfig = const ParticleSpawnConfig(), ParticleCanvasPainter? paintParticle, ParticleWidgetBuilder? buildParticle, bool isPaused = false, int? seed, Widget? child})
const
ParticleFlow.circles({Key? key, required int count, ParticleBehavior behavior = const ParticleBehavior.snow(), ParticleSpawnConfig spawnConfig = const ParticleSpawnConfig(), Color color = const Color(0xFFFFFFFF), double baseRadius = 4.0, bool isPaused = false, int? seed, Widget? child})
Convenience constructor for simple circle particles (e.g. snow/dust).
factory
ParticleFlow.emoji({Key? key, required String emoji, required int count, ParticleBehavior behavior = const ParticleBehavior.snow(), ParticleSpawnConfig spawnConfig = const ParticleSpawnConfig(), TextStyle style = const TextStyle(fontSize: 18), bool alignToCenter = true, bool isPaused = false, int? seed, Widget? child})
Convenience constructor for emoji/text-based particles (single text).
factory
ParticleFlow.emojis({Key? key, required List<String> texts, required int count, ParticleBehavior behavior = const ParticleBehavior.snow(), ParticleSpawnConfig spawnConfig = const ParticleSpawnConfig(), TextStyle style = const TextStyle(fontSize: 18), bool alignToCenter = true, bool isPaused = false, int? seed, Widget? child})
Convenience constructor for multiple emoji / text choices.
factory
ParticleFlow.widgets({Key? key, required int count, required ParticleWidgetBuilder buildParticle, ParticleBehavior behavior = const ParticleBehavior.snow(), ParticleSpawnConfig spawnConfig = const ParticleSpawnConfig(), bool isPaused = false, int? seed, Widget? child})
Convenience constructor for fully custom particle widgets.
factory

Properties

behavior ParticleBehavior
Behavior configuration: speed, gravity, opacity, lifetime, etc.
final
buildParticle ParticleWidgetBuilder?
Widget-based rendering callback.
final
child Widget?
Optional child rendered behind the particle overlay.
final
count int
Total number of particles.
final
hashCode int
The hash code for this object.
no setterinherited
isPaused bool
When true, animation stops updating but particles stay rendered.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
paintParticle ParticleCanvasPainter?
High-performance, canvas-based rendering callback.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seed int?
Optional random seed for deterministic behavior (useful for tests).
final
spawnConfig ParticleSpawnConfig
Where particles spawn from (top, sides, full area, custom rect, ...).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<ParticleFlow>
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, int wrapWidth = 65}) 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