搜索插件、代码仓与 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.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。