DotField constructor
DotField({})
Implementation
DotField({
required this.size,
this.density = 100,
this.minSpeed = 10,
this.maxSpeed = 20,
this.dotSize = 2.0,
this.dotColor = Colors.teal,
this.lineColor = Colors.teal,
this.threshold = 25,
this.sideStrength = 10,
this.maxLineLength = 75,
this.lineWidth = .5,
}) {
var numberOfDots = (.00001 * size.width * size.height).round() * density;
for (var i = 0; i < numberOfDots; i++) {
dots.add(
Dot.generateSimilarDot(
color: dotColor,
size: dotSize,
minSpeed: minSpeed,
maxSpeed: maxSpeed,
rangeOfMotion: size,
),
);
}
}