搜尋套件、儲存庫與 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.

所屬分類

原始碼儲存庫

使用此套件的專案