Skip to content
pubscout

drag_anim

1.3.6, released 10 months ago by an unverified publisher

Supports reorderable drag-and-drop sorting for grids, lists, and slivers in Flutter.

WASM-ready
$ flutter pub add drag_anim
Source repository

What it does

Provides a DragAnim widget that allows reorderable drag-and-drop sorting for virtually all widgets, including Web, Android, iOS, Windows, macOS, and Linux. It supports complex layouts like ListView, GridView, Waterfall, and Sliver series, including multiple drag-and-drop zones.

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

Use it when

  • You need drag-and-drop reordering inside GridViews, ListViews, or custom Sliver layouts.
  • You want support for multi-component or cross-sliver dragging and dropping.

Skip it when

  • You require standard simple reordering where the built-in ReorderableListView is sufficient.
  • You forget to pass a scrollController and scrollDirection, which will break automatic edge scrolling.

Strengths

  • Supports a wide variety of widgets including ListViews, GridViews, and Sliver series.
  • Supports multiple drags and drops such as SliverList combined with SliverGrid.
  • Cross-platform support across mobile, desktop, and web.

Weaknesses

  • Requires explicitly passing a scrollController and scrollDirection to enable edge auto-scrolling.
  • Limited documentation outside of README examples.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0
DragAnim(
  scrollController: scrollController,
  scrollDirection: Axis.vertical,
  buildItems: (dragItems) {
    return GridView.builder(
      controller: scrollController,
      gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 6),
      itemBuilder: (_, index) {
        return dragItems(
          data: items[index],
          child: Text(items[index]),
          key: ValueKey<String>(items[index]),
        );
      },
      itemCount: items.length,
    );
  },
  dataList: items,
)

Alternatives

Packages that do the same job and could replace drag_anim.