CustomRain constructor

CustomRain({
  1. Key? key,
  2. int numberOfDrops = 100,
  3. double fallSpeed = 1,
  4. int numLayers = 3,
  5. double dropHeight = 20,
  6. double dropWidth = 1,
  7. List<Color> colors = const [Colors.lightBlueAccent],
  8. double trailStartFraction = 0.3,
  9. double layersDistance = 1,
  10. Widget? child,
  11. bool isInBackground = true,
  12. bool hasTrail = false,
})

Implementation

CustomRain(
    {this.key,
      this.numberOfDrops =100,
      this.fallSpeed = 1,
      this.numLayers = 3,
      this.dropHeight = 20,
      this.dropWidth = 1,
      this.colors = const [Colors.lightBlueAccent],
      this.trailStartFraction = 0.3,
      this.layersDistance = 1,
      this.child,
      this.isInBackground = true,
      this.hasTrail = false})
    : assert(numLayers >= 1, "The minimum number of layers is 1"),
      assert(colors.isNotEmpty, "The drop colors list cannot be empty"),
      assert(layersDistance > 0,
      "The distance between layers cannot be 0, set  the number of layers to 1 at least"),
      super(key: key);