ParallaxRain(- {int numberOfDrops = 200,
- double dropFallSpeed = 1,
- int numberOfLayers = 3,
- double dropHeight = 20,
- double dropWidth = 1,
- List<Color> dropColors = const [Colors.greenAccent],
- double trailStartFraction = 0.3,
- double distanceBetweenLayers = 1,
- Widget? child,
- bool rainIsInBackground = true,
- 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");