Square constructor
Square({
- required int id,
- required GlobalKey<
State< squareKey,StatefulWidget> > - required Color colour,
- Widget? piece,
- String? symbol,
- bool draggable = true,
- double dragFeedbackSize = 2.0,
- Offset dragFeedbackOffset = const Offset(0.0, -1.0),
- void onTap()?,
- void onDragCancel()?,
- Color? highlight,
- 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;