getShapes method

List<Shape> getShapes(
  1. int count
)

Implementation

List<Shape> getShapes(int count) {
  return List.generate(
      count,
      (index) => Shape(
            pos: Offset(getDouble(0, maxWidth), getDouble(0, maxHeight)),
            dx: enableXMovements ? randomSpeed() : 0,
            dy: enableYMovements ? randomSpeed() : 0,
            size: getDouble(minSize, maxSize),
            color: colors[getDouble(0, colors.length - 1).toInt()]
                .withOpacity(getDouble(minOpacity, maxOpacity)),
            behaviour:
                behaviours[getDouble(0, behaviours.length - 1).toInt()],
          ));
}