Skip to content
pubscout

playing_cards_layouts

1.0.1, released 4 years ago by an unverified publisher

A Dart library package to produce playing cards layouts

WASM-ready
$ flutter pub add playing_cards_layouts
Source repository

What it does

Calculates coordinates and angles for an array of sized objects to form horizontal, vertical, or fan playing card layouts. It returns a list of positioning data while leaving the actual rendering up to the developer.

AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You are building a card game and need to calculate card positions for hands or layouts.
  • You want to arrange cards in horizontal, vertical, or fan formations using custom UI or CustomPainter.

Skip it when

  • You need a complete widget set with pre-built card graphics and animations.
  • You are not building card-based layouts.

Strengths

  • Provides multiple layout variations including horizontal, vertical, and fan.
  • Decouples layout calculations from presentation, allowing use with Flutter widgets or CustomPainter.

Weaknesses

  • Very limited documentation and configuration details beyond basic code snippets.
  • Does not handle rendering or UI elements directly.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
List<Map<String, dynamic>> _handCards = handCards(blockCards, {
    "flow": "horizontal",
    "spacing": -0.2,
    "width": 80.0,
});

Alternatives

Packages that do the same job and could replace playing_cards_layouts.

  • card_game

    A declarative Flutter package for building card games with drag-and-drop, animations, and flexible layouts.