Crossword constructor

const Crossword({
  1. Key? key,
  2. required List<List<String>> letters,
  3. required Offset spacing,
  4. bool? drawCrossLine,
  5. required dynamic onLineDrawn(
    1. List<String> words
    ),
  6. bool? drawHorizontalLine,
  7. bool? drawVerticalLine,
  8. required List<String> hints,
  9. LineDecoration? lineDecoration,
  10. TextStyle? textStyle,
  11. bool? acceptReversedDirection = false,
  12. bool? transposeMatrix = false,
  13. bool? allowOverlap = false,
  14. bool? addIncorrectWord = true,
  15. dynamic onLineUpdate(
    1. String word
    )?,
  16. List<Color>? invalidLineColors,
  17. RevealLetterDecoration? revealLetterDecoration = const RevealLetterDecoration(shakeOffset: Offset(20, 50), scaleFactor: 2),
  18. bool? updateStateWithParent = false,
})

Implementation

const Crossword({
  super.key,
  required this.letters,
  required this.spacing,
  this.drawCrossLine,
  required this.onLineDrawn,
  this.drawHorizontalLine,
  this.drawVerticalLine,
  required this.hints,
  this.lineDecoration,
  this.textStyle,
  this.acceptReversedDirection = false,
  this.transposeMatrix = false,
  this.allowOverlap = false,
  this.addIncorrectWord = true,
  this.onLineUpdate,
  this.invalidLineColors,
  this.revealLetterDecoration = const RevealLetterDecoration(
      shakeOffset: Offset(20, 50), scaleFactor: 2),
  this.updateStateWithParent = false,
}) : assert(
        (drawCrossLine ?? true) ||
            (drawHorizontalLine ?? true) ||
            (drawVerticalLine ?? true),
        "At least one of drawCrossLine, drawHorizontalLine, or drawVerticalLine should be true",
      );