CharacterParticle class
A character/emoji particle painter.
Renders particles as text characters or emojis, allowing for expressive and customizable flow visualizations.
Example:
// Emoji particle
ParticleEffect(
particlePainter: CharacterParticle(
character: 'π',
fontSize: 16.0,
),
particleCount: 3,
speed: 1,
)
// Text particle
ParticleEffect(
particlePainter: CharacterParticle(
character: 'β',
fontSize: 20.0,
),
particleCount: 5,
speed: 2,
)
- Implemented types
- Available extensions
Constructors
- CharacterParticle({String character = 'β', double fontSize = 12.0, Color? color})
- Creates a character/emoji particle painter.
Properties
- character β String
-
The character or emoji to display
final
- color β Color?
-
Optional color override for the particle (null = use connection color)
Note: For emojis, this may not have an effect as emojis render with their own colors
final
- fontSize β double
-
The font size in pixels
final
- hashCode β int
-
The hash code for this object.
no setterinherited
- isBuiltIn β bool
-
Available on ParticlePainter, provided by the ParticlePainterExtension extension
Check if this is a built-in particleno setter - runtimeType β Type
-
A representation of the runtime type of the object.
no setterinherited
- size β Size
-
The size of the particle.
Used for layout calculations and bounds checking.
no setteroverride
Methods
-
noSuchMethod(
Invocation invocation) β dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
Canvas canvas, Offset position, Tangent tangent, Paint basePaint) β void -
Paints the particle at the given position along the connection path.
override
-
toString(
) β String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) β bool -
The equality operator.
inherited