搜尋套件、儲存庫與 APP 分類

foldable_list 封面
套件詳情v1.0.1

foldable_list

一個可摺疊的動畫清單,當使用者點擊單元格時會顯示展開的項目

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
70
喜歡數
35
Pub 分數
150

安裝套件

flutter pub add foldable_list

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

FoldableList 是一個 Flutter 套件,提供了一個動畫互動式清單,點擊時項目可以展開和收起,並具有順暢的過渡效果。它透過允許使用者動態顯示清單單元格中的額外內容來提升使用者體驗。非常適合以緊湊版面顯示階層式或詳細資訊,支援所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。此套件輕量且易於整合,適用於需要可摺疊內容區塊的應用程式。

適用情境

  • 在緊湊列表中顯示詳細資訊
  • 建立摺疊式介面
  • 透過可展開部分增強導航
  • 建構常見問題或設定面板
  • 顯示嵌套資料層次結構

主要特色

  • 平滑的動畫展開和收合
  • 可自訂的動畫持續時間和曲線
  • 支援多個可展開項目
  • 與現有 ListView 的輕鬆整合
  • 跨平台相容性

適合對象

  • 開發互動式 UI 的開發者
  • 需要可摺疊內容的應用程式
  • 尋求優雅可展開清單的設計師
  • 具有動態資料顯示的專案
  • 具備豐富互動功能的行動與Web應用

使用建議

  • 在非常大的清單上可能會影響效能
  • 需要仔細處理狀態管理
  • 動畫行為在不同平台間可能略有差異
  • 複雜佈局的自訂功能有限
  • 最適合中等數量的可展開項目

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Foldable List

An animated foldable list cells with dynamic widget list input, let you display detailed item cell without navigating to a new screen.

enter image description here foldable_list_slide_animation.gif foldable_list_without_animation.gif

Features

  • Display list of widgets
  • Display detailed cell item
  • Animation transition between item cell and foldable item

Getting Started

In order to use foldable list package you need to install it via pubspec.yaml file

dependencies:
	foldable_list: ^1.0.1

Parameters

Name Type Description Required
foldableItems List<Widget> List of widget items that will be shown when an item is clicked True
items List<Widget> List of widgets that will be shown by default in the listview True
animationDuration Duration the duration of the animation by default: Duration(milliseconds: 500) False
animationType ANIMATION_TYPE the animation that will applied on the transition between items False

possible values of animationType : NONE, SIZE_TRANSITION, SCALE

Example

return  Scaffold(
	backgroundColor:  Colors.white,
	body:  Container(
		child:  FoldableList(
			animationType:  ANIMATION_TYPE.NONE,
			foldableItems:  this.expandedWidgetList,
			items:  this.simpleWidgetList
		)
	)
);

Result:

foldable_list_without_animation.gif

Contribution

Of course the project is open source, and you can contribute to it repository link

  • If you found a bug, open an issue.

  • If you have a feature request, open an issue.

  • If you want to contribute, submit a pull request.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。