The visual representation of the board. Can be used by itself to simply display
a board, or in conjunction with BoardController or some other wrapper to
manage its state and handle interactions.
A representation of a state of a board.
Stores the contents of each square in board, the turn to move,
orientation of the board, and highlights in lastFrom, lastTo and checkSquare.
Builds GestureDetectors for each square on the board, handling some
common gestures such as right clicks, long presses etc. Doesn't include
everything that GestureDetector supports because it has literally 60+
parameters. It's easy enough to add more if you need them, and if you think
one is a common enough use case, feel free to make a PR.
A representation of a move. from and to are square indices.
promo and piece (both optional) are uppercase single character piece symbols.
from can also be hand (-2), for drops originating off the board.
Used to define the widgets that will be built to represent pieces.
Simply provide a map pieces of String keys and WidgetBuilder values.
The keys should be uppercase for white pieces, and lowercase for black,
e.g. a white pawn is 'P' and a black pawn is 'p'.