Skip to content
pubscout

particle_field

1.0.0, released 4 years ago by gskinner.com

A Flutter widget for custom particle effects using CustomPainter and drawAtlas.

WASM-ready
$ flutter pub add particle_field
Source repository

What it does

Allows developers to add high-performance custom particle effects to their Flutter UI. Uses an onTick handler to manage a list of particles and updates them frame by frame.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need custom particle effects in your UI
  • You want high performance rendering using CustomPainter and drawAtlas

Skip it when

  • You need pre-made standard UI animations rather than custom particles

Strengths

  • High performance rendering using drawAtlas
  • Extensible architecture with a straightforward onTick callback

Weaknesses

  • Requires manual management of the particle list and lifecycle in code

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
ParticleField field = ParticleField(
  spriteSheet: sparkleSpriteSheet,
  origin: Alignment.topLeft,
  onTick: (controller, elapsed, size) {
    List<Particle> particles = controller.particles;
    particles.add(Particle(x: rnd(size.width), vx: rnd(-1, 1)));
  },
);

Alternatives

Packages that do the same job and could replace particle_field.

  • canvas_danmaku

    A high performance danmaku component for Flutter using CustomPainter.

  • flutter_tilt

    Easily apply tilt parallax hover effects for Flutter with support for light, shadow and gyroscope sensors.

  • particles_network

    Performant, interactive particle network widget for Flutter background animations.

  • wave

    Flutter widget for displaying animated wave backgrounds with custom color, duration, and effects.