LCOV - code coverage report
Current view: top level - lib/src/particles - composed_particle.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 13 0.0 %
Date: 2021-08-10 15:50:53 Functions: 0 0 -

          Line data    Source code
       1             : import 'dart:ui';
       2             : 
       3             : import 'particle.dart';
       4             : 
       5             : /// A single [Particle] which manages multiple children
       6             : /// by proxying all lifecycle hooks.
       7             : class ComposedParticle extends Particle {
       8             :   final List<Particle> children;
       9             : 
      10           0 :   ComposedParticle({
      11             :     required this.children,
      12             :     double? lifespan,
      13           0 :   }) : super(
      14             :           lifespan: lifespan,
      15             :         );
      16             : 
      17           0 :   @override
      18             :   void setLifespan(double lifespan) {
      19           0 :     super.setLifespan(lifespan);
      20             : 
      21           0 :     for (final child in children) {
      22           0 :       child.setLifespan(lifespan);
      23             :     }
      24             :   }
      25             : 
      26           0 :   @override
      27             :   void render(Canvas c) {
      28           0 :     for (final child in children) {
      29           0 :       child.render(c);
      30             :     }
      31             :   }
      32             : 
      33           0 :   @override
      34             :   void update(double dt) {
      35           0 :     super.update(dt);
      36             : 
      37           0 :     for (final child in children) {
      38           0 :       child.update(dt);
      39             :     }
      40             :   }
      41             : }

Generated by: LCOV version 1.15