updateParticles method

  1. @override
void updateParticles(
  1. List<Particle> particles,
  2. Size bounds, {
  3. GravityConfig gravity = const GravityConfig(),
})
override

Updates all particles' state based on the current simulation frame.

particles - List of all active particles. bounds - Current container size for boundary checking. gravity - Optional gravity configuration.

Implementation

@override
void updateParticles(
  List<Particle> particles,
  Size bounds, {
  GravityConfig gravity = const GravityConfig(),
}) {
  // Process each particle
  for (final Particle p in particles) {
    _applyGravity(p, gravity);
    p.update(bounds);
  }
}