ParallaxRain constructor Null safety

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

Implementation

ParallaxRain(
    {this.key,
    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"),
      super(key: key);