搜索插件、代码仓与 APP 分类

flutter_reorderable_list 封面
插件详情v1.3.1

flutter_reorderable_list

适用于 Flutter 的可重新排序列表。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.7万
喜欢数
169
Pub 分数
130

安装插件

flutter pub add flutter_reorderable_list

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 包,提供可重新排序的列表小部件,允许用户通过拖放操作更改列表中项目的顺序。它支持所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。该包与 Flutter 现有的列表小部件无缝集成,并在重新排序时提供流畅的动画效果。非常适合需要自定义项目排序的应用程序,例如任务管理器、待办事项列表或可排序内容。

适合场景

  • 任务优先级
  • 可排序的待办事项列表
  • 可自定义的仪表板布局
  • 重新排序图像画廊
  • 用户定义的内容序列

主要特点

  • 拖拽重排
  • 平滑动画
  • 跨平台兼容性
  • 与 ListView 的轻松集成
  • 支持自定义拖动手柄
  • 在重新排序期间保留项目状态

适合对象

  • 开发交互式列表的开发者
  • 需要用户驱动项排序的应用程序
  • 具有动态内容排序的项目
  • 需要直观数据操作的UI
  • 跨多个平台使用 Flutter 的团队

使用建议

  • 需要仔细处理状态管理
  • 在大数据集上可能影响性能
  • 复杂布局需要适当的手势处理
  • 不适用于静态或只读列表
  • 除了基本的拖动行为外,自定义功能有限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Reorderable List in Flutter

iOS-like proof of concept reorderable list with animations

Preview

Getting Started

See example/lib/main.dart for example usage

Highlights

Unlike flutter's ReorderableListView this one

  • Works with slivers so it can be placed in CustomScrollView and used with SliverAppBar
  • Supports large lists (thousands of items) without any issues

Other features

  • Smooth reordering animations
  • Supports different item heights
  • iOS like reordering with drag handle
  • Android like (long touch) reordering

Caveats

There are no API stability guarantees.

If you used previous version of reorderable list keep in mind that ReorderableListener now needs to be placed somewhere in ReorderableItem hierarchy in order to detect touch and trigger actual reordering (see the example).

Alternatively, you can wrap entire row in DelayedReorderableListener to get material like long-press reordering behavior.

所属分类

源码仓库

使用此插件的项目