StarModel.create constructor

StarModel.create(
  1. double width,
  2. double height,
  3. Random random,
  4. Color color,
  5. OutlinedBorder shape,
  6. bool fillShape,
)

Implementation

factory StarModel.create(double width, double height, Random random,
    Color color, OutlinedBorder shape, bool fillShape) {
  return StarModel(
    fillShape: fillShape,
    x: random.nextDouble() * width * 2 - width,
    y: random.nextDouble() * height * 2 - height,
    z: random.nextDouble() * width,
    pz: random.nextDouble() * width,
    color: color,
    width: width,
    random: random,
    height: height,
    shape: shape,
  );
}