LinesPatternPainter constructor

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

Creates a lines pattern painter.

spacing is the spacing between lines in logical pixels. lineThickness is the thickness of each line in logical pixels. color is the color of the lines. isHorizontal is whether the lines should be horizontal (true) or vertical (false). 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 LinesPatternPainter({
  required this.spacing,
  required this.lineThickness,
  required this.color,
  this.isHorizontal = true,
  this.repeatPattern = true,
  this.patternOffset = const Offset(0, 0),
}) : elementSize = lineThickness;