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. double trailStartFraction = 0.3,
  8. double layersDistance = 1,
  9. Widget? child,
  10. bool isInBackground = true,
  11. bool hasTrail = false,
  12. bool isPaused = false,
  13. required List<Color> colors,
})

Implementation

CustomRain({
 super.key,
 this.numberOfDrops = 100,
 this.fallSpeed = 1,
 this.numLayers = 3,
 this.dropHeight = 20,
 this.dropWidth = 1,
 this.trailStartFraction = 0.3,
 this.layersDistance = 1,
 this.child,
 this.isInBackground = true,
 this.hasTrail = false,
 this.isPaused = false, required this.colors,
  })  : 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");