PackageTrack
Sign in Get early access

dartchess

Provides chess and chess variants rules and operations including chess move generation, read and write FEN, read and write PGN.

0.13.1 2.8K downloads/mo #4755 most downloaded on pub.dev lichess-org/dartchess

What this package is like to depend on

Last release 3 months ago

25 May 2026

Ships unpredictably

gaps range from 9 days to 10 months

Nearly every release is documented

notes for 23 of 23 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

23 releases · first in 2023

6 releases in the last 12 months

see the full history below

Release timeline

23 releases · Jun 2023 to May 2026
2024 2025 2026
Release Pre-release

Releases

latest 23
  1. 0.13.1 25 May 2026
    Release notes
    • Introduces parseMultiGameLazy and PgnLazyGame for lazy parsing of PGN files. These APIs allow you to iterate through games in a PGN file without parsing the moves (only the headers).
    Open source →
  2. 0.13.0 18 May 2026
    Release notes

    Breaking changes:

    • Remove fast_immutable_collections dependency. Public APIs that previously returned IMap or IList now return standard Dart collections:
      • Position.legalMoves returns Map<Square, SquareSet> (was IMap<Square, SquareSet>)
      • Board.materialCount returns ByRole<int> / Map<Role, int> (was IMap<Role, int>)
      • Castles.rooksPositions returns BySide<ByCastlingSide<Square?>> / Map (was IMap-backed)
      • Castles.paths returns BySide<ByCastlingSide<SquareSet>> / Map (was IMap-backed)
      • PgnComment.shapes returns List<PgnCommentShape> (was IList<PgnCommentShape>)
      • makeLegalMoves() returns Map<Square, Set<Square>> (was IMap<Square, ISet<Square>>)
      • The BySide<T>, ByRole<T>, and ByCastlingSide<T> typedefs are now aliases for standard Map types.
    • Pockets.value is removed; use Pockets.of(side, role), Pockets.count(role), Pockets.size, Pockets.hasQuality(side), and Pockets.hasPawn(side) instead.

    The Position class remains completely immutable. Only the return types of some methods have changed to use standard Dart collections instead of immutable collections.

    Open source →
  3. 0.12.3 21 Mar 2026
    Release notes
    • Fix Crazyhouse.isGameOver and Crazyhouse.isCheckmate in positions where all legal moves are drop moves.
    Open source →
  4. 0.12.2 03 Mar 2026
    Release notes
    • Add SquareSet explosionSquares(Move move) method to Atomic class.
    Open source →
  5. 0.12.1 19 Feb 2026
    Release notes
    • Fix a bug in Horde.hasInsufficientMaterial that would cause a stack overflow if only one pawn was left.
    • Fix insufficient material detection when the Horde has a lone Queen.
    • Horde positions where the king is white instead of black are now correctly considered invalid.
    Open source →
  6. 0.12.0 03 Feb 2026
    Release notes
    • Fix an en passant bug in crazyhouse and atomicchess variants. Now the perft tests cover these variants as well.
    Open source →
  7. 0.11.1 04 Apr 2025
    Release notes
    • Add the current FEN information to PlayException messages.
    Open source →
  8. 0.11.0 31 Mar 2025
    Release notes
    • Rename makeLegalMove parameter isChess960 to includeAlternateCastlingMoves and invert its meaning. It now defaults to false.
    Open source →
  9. 0.10.0 17 Feb 2025
    Release notes
    • Remove the type parameter from Position class.
    • Update dependencies.
    Open source →
  10. 0.9.2 19 Oct 2024
    Release notes
    • Fixes castling rights parsing from FEN.
    • The FEN parser and writer now preserve syntactically valid castling rights even if there is no matching rook or king. Rename unmovedRooks to castlingRights.
    Open source →
  11. 0.9.1 16 Oct 2024
    Release notes
    • Fixes bugs in the PGN parser.
    Open source →
  12. 0.9.0 09 Oct 2024
    Release notes
    • PieceKind is now an enum.
    Open source →
  13. 0.8.0 02 Aug 2024
    Release notes

    Breaking changes:

    • Square is now an extension type.
    • Introduce File and Rank types.

    Bug fixes:

    • Fix Position.isLegal that was generating illegal king moves.
    • Fix Position.normalizeMove that could turn an illegal move into a legal castling move.
    Open source →
  14. 0.7.1 22 Jul 2024
    Release notes
    • Add Piece.kind, Role.letter and Role.uppercaseLetter getters.
    Open source →
  15. 0.7.0 29 Apr 2024
    Release notes
    • Migrate SquareSet to an extension type.
    Open source →
  16. 0.6.1 26 Jan 2024
    Release notes
    • Upgrade fast_immutable_collections to version 10.0.0.
    Open source →
  17. 0.6.0 24 Nov 2023
    Release notes
    • Rename Rules to Rule and add rule getter to Position
    Open source →
  18. 0.5.1 16 Nov 2023
    Release notes
    • Fix parsing PGN from smartchess
    Open source →
  19. 0.5.0 18 Oct 2023
    Release notes
    • Add new ply getter to Position
    • PgnNodeData is no longer specified as immutable
    • Make PgnComment really immutable
    Open source →
  20. 0.4.0 17 Oct 2023
    Release notes
    • Add PgnNodeData as a bound to PgnNode generic type parameter
    Open source →
  21. 0.3.0 14 Oct 2023
    Release notes
    • rename Headers to PgnHeaders for consistency
    • PgnGame isn't a const constructor anymore
    • tweak parseMultiGamePgn signature for consistency
    Open source →
  22. 0.2.0 14 Oct 2023
    Release notes
    • add makeSan and makeSanUnchecked methods to the Position class.
    • toSan and playToSan are now deprecated.
    Open source →
  23. 0.1.0 20 Jun 2023
    Release notes
    • Initial version.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive