Crosshatch constructor

const Crosshatch({
  1. required Color bgColor,
  2. required Color fgColor,
  3. int featuresCount = Pattern.DEFAULT_SQUARES_COUNT,
})

Paints a Pattern made of 10 diamond shapes across the largest side with the foreground color as their border color.

Example:

Crosshatch(bgColor: Colors.yellow, fgColor: Colors.black).paintOnPath(canvas, size, path);

Implementation

const Crosshatch(
    {required this.bgColor,
    required this.fgColor,
    this.featuresCount = Pattern.DEFAULT_SQUARES_COUNT})
    : super(
          patternType: PatternType.crosshatch,
          bgColor: bgColor,
          fgColor: fgColor);