Skip to content
pubscout

spannable_grid

0.3.0, released 5 years ago by eche.dev

A Flutter grid widget with cells that span rows and columns and support editing/moving.

WASM-ready
$ flutter pub add spannable_grid
Source repository

What it does

SpannableGrid is a custom grid widget for Flutter with a fixed number of rows and columns where individual cells can span multiple rows and columns. It includes an editing mode allowing users to move cells around the grid with various strategies and styling options.

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

Use it when

  • You need a dashboard-like layout where items can occupy varying numbers of rows and columns.
  • You want users to be able to rearrange or edit grid items interactively.

Skip it when

  • You need an infinitely scrolling or lazy-loaded grid of identical items.
  • You require complex staggered layouts that automatically flow items without explicit grid coordinates.

Strengths

  • Supports cells spanning arbitrary columns and rows.
  • Built-in interactive editing mode with multiple strategies (drag, long tap, nearby moves).
  • Configurable styling for grid structure, empty cells, and spacing.

Weaknesses

  • Grid size (number of columns and rows) must be fixed.
  • Breaking API changes occurred in recent minor version updates (e.g., v0.3.0).

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

No special native configuration required. Add the dependency and import the package.

SpannableGrid(
  columns: 4,
  rows: 4,
  cells: cells,
  onCellChanged: (cell) { print('Cell ${cell.id} changed'); },
)

Alternatives

Packages that do the same job and could replace spannable_grid.

  • flutter_staggered_grid_view

    Better suited for dynamic or staggered lists and grids with varying tile sizes that don't necessarily adhere to a strict fixed-size grid with built-in moving/editing capabilities.