DotsPatternPainter constructor

const DotsPatternPainter({
  1. required double spacing,
  2. required double dotSize,
  3. required Color color,
  4. bool repeatPattern = true,
  5. Offset patternOffset = const Offset(0, 0),
})

Creates a dots pattern painter.

spacing is the spacing between dots in logical pixels. dotSize is the size of each dot in logical pixels. color is the color of the dots. repeatPattern is whether the pattern should repeat across the canvas. patternOffset is the offset from the top-left corner where the pattern starts.

Implementation

const DotsPatternPainter({
  required this.spacing,
  required this.dotSize,
  required this.color,
  this.repeatPattern = true,
  this.patternOffset = const Offset(0, 0),
}) : elementSize = dotSize;