card_game
2.0.0, released 2 years ago by jlogical.com
A declarative Flutter package for building card games with drag-and-drop, animations, and flexible layouts.
What it does
A declarative Flutter package for building card games with drag-and-drop, animations, and flexible layouts. It provides standard playing cards and numeric cards out of the box, along with built-in validation for card movements.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a card game like Solitaire, War, or Memory Match in Flutter.
- You need drag-and-drop functionality with movement validation for cards.
- You want smooth animations for card movements and flips.
Skip it when
- You are building a non-card-based 2D or 3D game that requires a full game engine.
- You require complex physics simulations outside of card stacking and dragging.
Strengths
- Declarative API with no controllers needed
- Built-in drag-and-drop support with validation
- Smooth built-in animations for movements and flips
- Supports standard playing cards and custom numeric cards
Weaknesses
- Limited to card-based games
- Requires managing state for the game externally (e.g., via hooks or state management)
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
not documented
CardGame<int, int>(
style: numericCardStyle(),
children: [
SafeArea(
child: Column(
children: [
CardColumn<int, int>(
value: 0,
values: [1, 2, 3],
maxGrabStackSize: 1,
),
],
),
),
],
)Alternatives
Packages that do the same job and could replace card_game.
- playing_cards_layouts
A Dart library package to produce playing cards layouts
40Compare - spritewidget
Toolkit for building complex, high performance animations and 2D games with Flutter.
50Compare
Works with
Packages commonly used together with card_game: ones it builds on, ones built on it, and its own family.
- equatablecard_game depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- flutter_svgcard_game depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- providercard_game depends on itA lightweight wrapper around InheritedWidget for state management