dartchess
0.15.0, released 2 weeks ago by lichess.org
A Dart library for chess rules, move generation, and FEN/PGN parsing with variant support.
What it does
Provides immutable chess position handling, legal move generation, and game outcome detection. Includes FEN/PGN read/write and support for Chess960 and several chess variants.
AI-written summary of version 0.15.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need chess logic on native Flutter apps
- You require move generation and board state handling without UI components
Skip it when
- Your app targets web platforms
- You need a full UI chess board widget
Strengths
- Immutable data structures ensure safety
- Supports multiple chess variants and Chess960
- No heavy external collection dependencies
Weaknesses
- Does not support web platforms
- Breaking API changes between versions
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
import 'package:dartchess/dartchess.dart';
final pos = Chess.fromSetup(Setup.parseFen('r1bqkbnr/ppp2Qpp/2np4/4p3/2B1P3/8/PPPP1PPP/RNB1K1NR b KQkq - 0 4'));
assert(pos.isCheckmate == true);Alternatives
Packages that do the same job and could replace dartchess.
- pubspec_manager
Type-safe API to read, modify, and write pubspec.yaml while preserving comments.
78Compare - chess
Library for generating legal chess moves, tracking game state, and converting between FEN/PGN.
50Compare - ini
Read and write INI configuration files in pure Dart
44Compare - mutex
Mutual exclusion locks and read-write locks for asynchronous Dart code
50Compare
Works with
Packages commonly used together with dartchess: ones it builds on, ones built on it, and its own family.