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 particle
no 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