- Fix default value of brightness
- Improved the color filter
- Values of hue and brightness are now precised in the documentation
BrightnessHueFilter
widget is now exposed.
- Add the possibility to change board colors
- Added a new
DragTargetKind
settings to control the appearance of the drag target. - Detects if the drag is triggered with a mouse or a touch event, and adjust the drag settings accordingly to provide a better experience.
- Removed the
withValues
not yet available in specified dart sdk version.
- Removed
ChessboardEditorSettings
. TheChessboardEditor
widget now takes aChessboardSettings
object as a parameter.
- Add a new
border
settings to show a border around the board.
- Fixed a timer not properly canceled when the board is disposed.
- Added a new
StaticChessboard
widget that is optimized for scrollable contexts. SolidColorChessboardBackground
is now implemented withCustomPaint
to improve performance when building a lot of boards.- Added a new board colorscheme:
ic
.
- Introduced a
ChessgroundImages
singleton to precache piece images. This is useful when using the same piece set in multiple places, and to avoid using the global flutter image cache, which can be unpredictable. It should prevent any "blinking" effect that could happen with theImage
widget when the image is reloaded from the cache.
- Reset animation state when the board is updated. This fixes potential issues where the board would display ghost pieces on some conditions.
- Dragging a piece to the same square will now keep the piece selected.
- Added another
Chessboard.fixed
constructor that allows to set the board to a fixed position. - Premove state is now lifted up to the parent widget, in order to allow instant play of premoves.
- Promotion state is now lifted up to the parent widget, in order to allow more control over the promotion dialog.
- Add symmetric piece set (
PieceAssets.symmetric
). ChessboardEditor
now supports highlighting squares.- Flip
BoardSettings.dragFeedbackOffset.dy
for flipped pieces. Support displaying all pieces upside down based on side to move. - Fix: ensure the board background does not overflow the board.
Chessboard
now require agame
parameter of typeGameData
instead ofBoardData
.- Added required parameters
piece
andpieceAssets
toPieceShape
, removedrole
. Added optionalopacity
parameter. - Remove 'ChessboardState.opponentsPiecesUpsideDown' in favor of
ChessboardSettings.pieceOrientationBehavior
.
- Add a
ChessboardEditor
widget, intended to be used as the basis for a board editor like lichess.org/editor. - Add the
writeFen
helper function.
- Requires an SDK version of at least 3.3.0.
- Chessground is now dependant on
dartchess
. It is only used for the models, and not for the game logic, so Chessground can still be used with any chess library. Board
has been renamed toChessboard
, along with other classes.
- Fix arrow bad shape when new destination is the same as the origin: it now returns a circle.
- Fix unsetting premoves:
- When a premove is set, tapping on the same origin square will now unset it.
- dragging a piece to an invalid square will now unset the premove.
- dragging a piece off the board will now unset the premove.
- Add
pieceShiftMethod
toBoardSetttings
, with possible values:either
(default),drag
, ortapTwoSquares
.
- Any simultaneous touch on the board will now cancel the current piece selection or drag.
- Allow shapes to be drawn on a non-interactable board.
- Fix a bug where the board would be stuck after transitioning from a non-interactable board to an interactable one.
- Selecting a piece will now clear all shapes on the board.
- Add the
scale
property to allShape
classes. Use a 0.8 scale for the shapes being drawn on the board to distinguish them from the already drawn ones.
- Add an optional
scale
parameter to arrows (default isscale: 1.0
, matching the previous behavior). - Implement
BoardData.copyWith
method to allow updating the board data - Implement
BoardData
equality and hashcode operators - Implement
BoardSettings
equality and hashcode operators
Improve board interaction and add support for drawing shapes while playing.
- pieces are now moved with pointer down events, instead of a tap events (pointer down followed by a pointer up event): this allows to move a piece faster
- premoves are not anymore cleared when selecting another piece: this matches lichess website behaviour and allow to prepare another move along with the premove that is currently set
- drawing shapes is now possible while keeping the normal board play interaction (before it was either one or another mode)
- one can draw a shape by holding a finger to an empty square while using a second finger to draw a shape anywhere in the board
- a double tap on an empty square will clear all shapes at once
- to clear a single shape is still supported: draw the same shape again
- Fix coordinates and board display on devices with RightToLeft Directionality.
- Improve coordinates display on the board.
- Fix
borderRadius
settings not being applied to the board highlights.
- Fix BoardSettings
copyWith
method.
- Add 2 new settings:
borderRadius
andboxShadow
.
- Add a new shape type: piece (useful to show promotion hints).
- Don't clip board: fix annotations display on edge.
- Deprecate
BoardTheme
and exportBackground
.
- Remove handling of android gestures exclusion.
- Upgrade fast_immutable_collections to version 10.0.0.
- Improve quality of PNG files, fix wrong rendering of some piece set like "Cardinal". More info: #28.
- Piece cache size is now rounded to the nearest integer above the actual value.
BoardData.sideToMove
is now optional with no default value, as well asBoardData.isCheck
and constructor assertion will guarantee they are set when needed.
BoardData.sideToMove
is now a required parameter.
- Fix missing blindfoldMode to BoardSettings.copyWith
- Add blindfold mode
- Don't run premove timer if premove is not set
- Don't try to execute a premove if it is not allowed.
- Use an immediate timer to execute premove, instead of a post frame callback.
premove
is not anymore a local state, so it can be controlled by the parent
- Change the
autoQueenPromotionOnPremove
default setting to true
- Add a drawing shapes option
- Add the
autoQueenPromotionOnPremove
setting
- Improve check highlight appearance and fix rendering with Impeller.
- Remove opacity on origin piece when dragging because of performance issue with impeller engine.
- Add
isDrop
meta info toonMove
callback.
- Add Caliente, Kiwen-Suwi and MPChess piece sets
- Fix promotion menu still showing when going back in moves history
- tapping one's piece now cancels premove.
showValidMoves
board setting now applies to premoves.
- When premoving, tapping same piece will now deselect it (to be consistent with normal moves).
- Ensure premove square highlight takes precedence over last move.
Initial release.