ParallaxRain constructor Null safety

ParallaxRain(
  1. {int numberOfDrops = 200,
  2. double dropFallSpeed = 1,
  3. int numberOfLayers = 3,
  4. double dropHeight = 20,
  5. double dropWidth = 1,
  6. List<Color> dropColors = const [Colors.greenAccent],
  7. double trailStartFraction = 0.3,
  8. double distanceBetweenLayers = 1,
  9. Widget? child,
  10. bool rainIsInBackground = true,
  11. bool trail = false}
)

Implementation

ParallaxRain(
    {this.numberOfDrops = 200,
    this.dropFallSpeed = 1,
    this.numberOfLayers = 3,
    this.dropHeight = 20,
    this.dropWidth = 1,
    this.dropColors = const [Colors.greenAccent],
    this.trailStartFraction = 0.3,
    this.distanceBetweenLayers = 1,
    this.child,
    this.rainIsInBackground = true,
    this.trail = false})
    : assert(numberOfLayers >= 1, "The minimum number of layers is 1"),
      assert(dropColors.isNotEmpty, "The drop colors list cannot be empty"),
      assert(distanceBetweenLayers > 0,
          "The distance between layers cannot be 0, try setting the number of layers to 1 instead");