CustomRain constructor
CustomRain({
- Key? key,
- int numberOfDrops = 100,
- double fallSpeed = 1,
- int numLayers = 3,
- double dropHeight = 20,
- double dropWidth = 1,
- List<
Color> colors = const [Colors.lightBlueAccent], - double trailStartFraction = 0.3,
- double layersDistance = 1,
- Widget? child,
- bool isInBackground = true,
- 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);