reset method

void reset()

Implementation

void reset() {
  final random = Random();
  x = random.nextDouble() * screenSize.width; // Random horizontal position
  y = random.nextDouble() * -screenSize.height; // Start above the screen
  radius = random.nextDouble() * 4 + 2; // Random size (small for snowflakes)
  speed = random.nextDouble() * 2 + 1; // Random falling speed
  drift = random.nextDouble() * 0.5 - 0.25; // Slight left-right drift
  radius = random.nextDouble() * 4 + 2; // Random size (small for snowflakes)
  blur = random.nextDouble() * 5; // Random blur

  paint = Paint()
    ..color = color // Snowflake color with opacity
    ..style = PaintingStyle.fill
    ..maskFilter = MaskFilter.blur(BlurStyle.normal, blur);
}