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

插件详情v3.3.2

configurable_expansion_tile_null_safety

一个可配置的展开项,源自 Flutter Material 实现,支持自定义

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
4810
喜欢数
26
Pub 分数
140

安装插件

flutter pub add configurable_expansion_tile_null_safety

插件介绍

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

一个可自定义的 ExpansionTile 小部件,源自 Flutter 的 Material 实现,旨在提供更高的灵活性。支持空安全,并允许开发者定制小部件的外观和行为,包括自定义标题、图标和动画控制。非常适合创建具有独特样式或交互元素的可折叠内容区域。该包可在所有主要平台上兼容,并通过额外的配置选项扩展了标准 ExpansionTile。

适合场景

  • 自定义可折叠UI组件
  • 表单中的动态内容区域
  • 交互式常见问题接口
  • 嵌套可展开列表
  • 可访问的导航面板

主要特点

  • 完全空安全
  • 可扩展的标题自定义
  • 可配置的动画和图标行为
  • 支持所有 Flutter 平台
  • 与现有控件的轻松集成

适合对象

  • 需要灵活扩展面板的开发者
  • UI 设计师需要视觉控制
  • 具有复杂可展开内容的应用程序
  • 跨平台应用
  • 使用现代 Dart 实践的项目

使用建议

  • 需要理解 Flutter widget 树
  • 可能会略微增加打包大小
  • 限于材料设计规范
  • 不适用于非扩展用例
  • 依赖上游 Material 变化

原始 README

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

configurable_expansion_tile

A Configurable Expansion Tile edited from the flutter material implementation that allows for customization of the internal components. Includes providing colours, replacement widgets on expansion, and custom animations.

Tile animations still takes place (which are also configurable), and a widget can be set to precede and/or follow the provided header, which will rotate on expand/collapse of the tile.

Configure any or all parameters or leave default behaviour - header works out of the box.

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

configurable_expansion_tile: <latest_version>

Usage

import 'package:configurable_expansion_tile/configurable_expansion_tile.dart';

class MyWidget extends StatelessWidget {
  Widget build(BuildContext context) {
    return ConfigurableExpansionTile(
      headerExpanded: Flexible(child: Center(child: Text("A Header Changed"))),
      header: Container(child: Center(child: Text("A Header"))),
      childrenBody: Row(
        children: <Widget>[Text("CHILD 1")],
      ),
    );
  }
}

Example

View the Flutter app in the example directory.

Screenshot

Tile Collapsed

Tile Expanded

Contributors

所属分类

源码仓库

使用此插件的项目

暂无相关数据。