Skip to content
pubscout

flutter_sortable_wrap

1.0.5, released 3 years ago by an unverified publisher

A reorderable and sortable wrap widget written in pure Dart.

WASM-ready
$ flutter pub add flutter_sortable_wrap
Source repository

What it does

Provides a SortableWrap widget that allows users to rearrange child widgets using drag and drop interactions. It supports spacing, run spacing, and long-press to drag functionality across multiple platforms.

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

Use it when

  • You need a Wrap layout where children can be reordered by dragging.
  • You want a pure Dart solution supporting mobile, web, and desktop.

Skip it when

  • You need standard linear reordering (use ReorderableListView instead).
  • You require complex grid animations not supported by Wrap layouts.

Strengths

  • Supports multiple platforms including iOS, Android, Web, macOS, Linux, and Windows.
  • Simple API similar to standard Wrap widgets.
  • Supports long-press to trigger dragging.

Weaknesses

  • Limited feature documentation outside of basic reordering.
  • No built-in state management for the underlying data array.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
SortableWrap(
  children: children,
  onSorted: (int oldIndex, int newIndex) {
    setState(() {
      your_data_array.insert(newIndex, your_data_array.removeAt(oldIndex));
    });
  },
  spacing: 10,
  runSpacing: 15,
)

Alternatives

Packages that do the same job and could replace flutter_sortable_wrap.