Skip to content
pubscout

flutter_draggable_gridview

1.0.0, released 11 months ago by mindinventory.com

Adds drag and drop reordering functionality to existing GridView.builder widgets.

WASM-ready
$ flutter pub add flutter_draggable_gridview
Source repository

What it does

Provides a DraggableGridViewBuilder widget that allows users to reorder items inside a grid through drag and drop gestures. It supports customization via callbacks for feedback widgets, placeholders, and completion handlers.

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

Use it when

  • You need a grid view where users can rearrange items by dragging and dropping.
  • You want a drop-in replacement for GridView.builder with drag capabilities.

Skip it when

  • You require complex staggered grid layouts (use flutter_staggered_grid_view instead).
  • You don't need drag and drop functionality.

Strengths

  • Easy to implement with few lines of code
  • Supports properties from GridView.builder
  • Cross-platform support including mobile, web, and desktop

Weaknesses

  • You are responsible for permanently storing the reordered list results
  • Limited documentation on advanced configurations

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
DraggableGridViewBuilder(
  gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
    crossAxisCount: 2,
    childAspectRatio: 1.0,
  ),
  children: _listOfDraggableGridItem,
  dragCompletion: (List<DraggableGridItem> list, int beforeIndex, int afterIndex) {},
)

Alternatives

Packages that do the same job and could replace flutter_draggable_gridview.