initParams method

Future<void> initParams(
  1. List<Particle> ps,
  2. double startX,
  3. double startY
)

Implementation

Future<void> initParams(List<Particle> ps, double startX, double startY) async {
  if (widget.viewWidth != 0 && widget.viewHeight != 0 && ps.isEmpty) {
    int count = 40;
    for (int i = 0; i < count; i++) {
      ps.add(_generatePartice(Colors.red, Random(), startX, startY));
    }
  }
}