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

toggle_list 封面
插件详情v0.3.1

toggle_list

一个易于使用且高度可定制的可展开列表小部件,适用于您的 Flutter 应用程序。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
460
喜欢数
72
Pub 分数
150

安装插件

flutter pub add toggle_list

插件介绍

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

toggle_list 是一个 Flutter 包,提供了一个易于使用且高度可定制的可展开列表小部件。它允许开发者创建带有可折叠部分的交互式列表,非常适合以简洁、节省空间的方式组织内容。支持所有主要平台——Android、iOS、Web、macOS、Windows 和 Linux,确保在各个平台上行为一致。该小部件设计简单灵活,可自定义动画、图标、颜色和内容结构。非常适合用于设置面板、常见问题解答或任何层次数据展示。

适合场景

  • 设置界面
  • 常见问题部分
  • 分层数据展示
  • 可折叠的导航菜单
  • 动态内容分组

主要特点

  • 可自定义的展开/折叠动画
  • 对多个平台目标的支持
  • 可扩展的部件设计
  • 可配置的图标和颜色
  • 简单的集成 API
  • 灵活的内容布局

适合对象

  • 寻求可扩展列表的开发者
  • 需要交互式组件的UI设计师
  • 具有嵌套或分组内容的应用程序
  • 跨平台应用
  • 需要最少样板代码的项目

使用建议

  • 需要具备基本的 Flutter widget 知识
  • 复杂布局可能需要额外的样式
  • 仅限基于列表的展开(不支持树形结构)
  • 未针对无分页的超大数据集进行优化

原始 README

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

Logo

An easy-to-use and highly customizable expandable list widget for your Flutter application.

GitHub release (latest SemVer) GitHub Lines of code

This package is not yet widely tested.

Use it with caution and file any potential issues you see.

Installation

Via command line
flutter pub add toggle_list
Manually

Add the following line to your pubspec.yaml file.

dependencies:
  toggle_list: ^0.3.1

Then either save the file or use the flutter pub run command.

Import
import 'package:toggle_list/toggle_list.dart';

Usage

return Scaffold(
  body: ToggleList(
    children: [
      ToggleListItem(
        title: const Text('I am the first item'),
        content: const Padding(
          padding: EdgeInsets.all(20),
          child: Text('Hello there!'),
        ),
      ),
      ToggleListItem(
        title: const Text('I am the second item'),
        content: const Padding(
          padding: EdgeInsets.all(20),
          child: Text('I am delighted that you are here.'),
        ),
      ),
      ToggleListItem(
        title: const Text('I am the third item'),
        content: const Padding(
          padding: EdgeInsets.all(20),
          child: Text('Have a wonderful day!'),
        ),
      ),
    ],
  ),
);

For a more detailed use case, check out the example directory.

Contributing

Contributions of any kind are always welcome!

As of now, we don't have a standardized way for contributions. For this reason, if you would like to help us with your coding, feel free to send an email to [contact@binarybush.dev](mailto:contact@binarybush.dev).

Metadata

:green_book: Documentation

:email: [contact@binarybush.dev](mailto:contact@binarybush.dev)

:bug: Bug report

:zap: Requesting features

Every opened issue is very much appreciated!

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。