squares library

Classes

Board
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.
BoardController
A wrapper that handles interactions and certain elements of board state (such as premoves) for a Board.
BoardSize
Specifies the dimensions of a board.
BoardState
A representation of a state of a board. Stores the contents of each square in board, the player to move, orientation of the board, and highlights in lastFrom, lastTo and checkSquare.
BoardTheme
Describes a colour scheme to be used by a Board.
Hand
A hand of pieces to drop from, such as in Crazyhouse.
HighlightTheme
A theme that specifies a number of widget builder functions, used to define how various highlights are drawn on the board.
Move
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.
PartialMove
Used for dragging pieces.
Piece
PieceSelector
A popup widget used to select pieces to be used for promotion, or for gating.
PieceSelectorData
Also used for gating.
PieceSet
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'.
Square
A single square on a chess board or piece selector. Optionally contains a piece.

Extensions

IterableExtension on Iterable<T>

Constants

ASCII_a → const int
BLACK → const int
HAND → const int
STANDARD_PIECES → const List<String>
WHITE → const int