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

tap_to_expand 封面
插件详情v0.7.2

tap_to_expand

此包旨在用极少的代码行快速轻松地构建可展开小部件,您还可以根据需要进行自定义!

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
100
喜欢数
98
Pub 分数
150

安装插件

flutter pub add tap_to_expand

插件介绍

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

tap_to_expand 包使开发者能够以最少的代码快速轻松地创建可展开的控件。它提供了一种简单且可自定义的解决方案,用于切换内容的可见性,非常适合用户界面中的可折叠部分。该包支持所有主要平台——Android、iOS、Web、macOS、Windows 和 Linux,确保在各个平台上行为一致。该包设计灵活,允许自定义动画、持续时间以及视觉外观。非常适合表单、常见问题解答或任何需要按需展开的内容。

适合场景

  • 创建可折叠的常见问题部分
  • 构建交互式表单折叠面板
  • 按需显示详细信息
  • 增强移动应用导航
  • 简化复杂的用户界面布局

主要特点

  • 使用少量代码进行最小化设置
  • 可自定义的动画和持续时间
  • 支持所有主要的 Flutter 平台
  • 可扩展的样式选项
  • 与现有控件的轻松集成

适合对象

  • 初学者 Flutter 开发者
  • 需要交互式可展开内容的应用
  • 以UI为主的应用程序
  • 快速原型设计
  • 需要跨平台一致性的项目

使用建议

  • 可能需要额外的样式设置以适应复杂布局
  • 动画性能应在低端设备上进行测试
  • 有限的内置可访问性功能
  • 不适用于非常大的数据集
  • 可能需要自定义逻辑来处理嵌套的可展开项

原始 README

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

anouncement pub package

This package provides an easy and fast way to build expandable widgets with minimal code. You can customize these widgets according to your needs.

Features

  • Easily include your content
  • Enable scrolling with the isScrollable parameter
  • Beautiful animations

Getting started

To use this plugin, add tap_to_expand as a dependency in your pubspec.yaml file.

dependencies:
  tap_to_expand: ^1.0.0

Usage

Here is How to use TapToExpand class, You can find Package Api HERE

Center(
        child: TapToExpand(
          content: Column(
            children: <Widget>[
              for (var i = 0; i < 20; i++)
                Text(
                  "data $i",
                  style: const TextStyle(color: Colors.white, fontSize: 20),
                ),
            ],
          ),
          title: const Text(
            'TapToExpand',
            style: TextStyle(
              color: Colors.white,
              fontSize: 20,
            ),
          ),
          onTapPadding: 10,
          closedHeight: 70,
          scrollable: true,
          borderRadius: 10,
          openedHeight: 200,
        ),
      ),

For more information and customization options, visit the TapToExpand GitHub repository.

TapToExpandLetter(
                // autoClose: false, default is true
                title: const Text(
                  'Tap to Expand',
                  style: TextStyle(
                      color: Colors.white,
                      fontSize: 16,
                      fontWeight: FontWeight.w600),
                ),
                content: Column(
                  children: const [
                    Text(
                      'Feel free to use the code in your projects but do not forget to give me the credits adding  (Flutter Animation Gallery) where you are gonna use it.',
                      style: TextStyle(
                        color: Colors.white,
                        fontSize: 18,
                        fontWeight: FontWeight.w400,
                      ),
                    ),
                    // Image.asset(
                    //   'assets/image_ex.png',
                    //   width: 150,
                    //   height: 150,
                    // ),
                  ],
                ),
                centerWidget: const Icon(
                  Icons.expand_less_rounded,
                  size: 50,
                ))
          ],
        ),

所属分类

源码仓库

使用此插件的项目

暂无相关数据。