Meteorite constructor

Meteorite({
  1. required int smallestWidth,
  2. required double starSize,
  3. required MeteoriteCompleteListener listener,
  4. required Random random,
  5. required Color color,
  6. required double startX,
  7. required double startY,
})

Implementation

Meteorite({
  required this.smallestWidth,
  required this.starSize,
  required this.listener,
  required this.random,
  required this.color,
  required double startX,
  required double startY,
}){
  _factor = starSize * (doubleInRange(random, 0.1, 2) * 1.9);
  _x = startX;
  _y = startY;
  _trailLength = doubleInRange(random, 20, 180);
  debugPrint('METEORITE FACTOR: $_factor');

  _trailPaint = Paint()
    ..style = PaintingStyle.stroke
    ..strokeWidth = 4.0
    ..color = color
    ..style = PaintingStyle.fill;

  _paint = Paint()
    ..isAntiAlias = true
    ..style = PaintingStyle.stroke
    ..strokeWidth = 4.0
    ..color = color
    ..style = PaintingStyle.fill;

}