Square constructor

Square({
  1. required int id,
  2. required GlobalKey<State<StatefulWidget>> squareKey,
  3. required Color colour,
  4. Widget? piece,
  5. String? symbol,
  6. bool draggable = true,
  7. double dragFeedbackSize = 2.0,
  8. Offset dragFeedbackOffset = const Offset(0.0, -1.0),
  9. void onTap(
    1. GlobalKey<State<StatefulWidget>>
    )?,
  10. void onDragCancel()?,
  11. Color? highlight,
  12. HighlightTheme? highlightTheme,
})

Implementation

Square({
  required this.id,
  required this.squareKey,
  required this.colour,
  this.piece,
  this.symbol,
  this.draggable = true,
  this.dragFeedbackSize = 2.0,
  this.dragFeedbackOffset = const Offset(0.0, -1.0),
  this.onTap,
  this.onDragCancel,
  this.highlight,
  HighlightTheme? highlightTheme,
}) : this.highlightTheme = highlightTheme ?? HighlightTheme.basic;