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

flutter_popup 封面
插件详情v3.3.9

flutter_popup

flutter_popup 包是用于在 Flutter 应用中创建可自定义弹窗的多功能工具。其高亮功能能有效引导用户注意力至特定区域

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
9150
喜欢数
205
Pub 分数
145

安装插件

flutter pub add flutter_popup

插件介绍

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

flutter_popup 包为 Flutter 应用程序中的弹出窗口提供了一个灵活且可自定义的解决方案。旨在提升用户体验,它能有效吸引用户对特定 UI 区域的注意力,非常适合用于教程、警告或引导式交互。该包支持所有主要平台——包括 Android、iOS、Web、macOS、Windows 和 Linux,确保在各个平台上行为一致。通过 pub.dev 可轻松集成,为开发者提供了简洁的 API,以便自定义弹出窗口的外观和行为。

适合场景

  • 用户入门教程
  • 上下文警报
  • 引导式应用导览
  • 交互式提示
  • 表单验证提示

主要特点

  • 可自定义弹出内容
  • 跨平台兼容性
  • 焦点高亮
  • 与 pub.dev 的轻松集成
  • 响应式设计支持

适合对象

  • 开发交互式应用程序的开发者
  • 需要入职功能的团队
  • 需要用户指导的应用程序
  • 使用 Flutter 的 UI/UX 设计师
  • 针对多个平台的项目

使用建议

  • 需要仔细放置以避免遮挡关键UI
  • 可能需要额外的样式来处理复杂布局
  • 大量并发弹窗带来的性能影响
  • 内置动画功能有限,仅限基本过渡效果
  • 取决于正确的上下文以正确定位

原始 README

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

flutter_popup

The flutter_popup package is a convenient tool that enables you to display a straightforward and customizable popup within your Flutter application. It offers a highlight feature that can be utilized to direct the user's attention to a specific area as needed.

Getting Started

image image image image

How to use

dependencies:
  flutter_popup: ^latest_version
import 'package:flutter_popup/flutter_popup.dart';
// easy to use
CustomPopup(
  content: Text('George says everything looks fine'),
  child: Icon(Icons.help),
),

CustomPopup(
  arrowColor: Colors.orange,
  barrierColor: Colors.green.withOpacity(0.1),
  backgroundColor: Colors.white,
  content: Text('George says everything looks fine'),
  child: Icon(Icons.help),
),

CustomPopup(
  content: _Slider(),
  position: PopupPosition.top,
  child:Text('slider'),
)

CustomPopup(
  content: Column(
  mainAxisSize: MainAxisSize.min,
    children: List.generate(5, (index) => Text('menu$index')),
  ),
  child: const Icon(Icons.add_circle_outline),
)

Container(
  decoration: BoxDecoration(color: Colors.white),
  padding: EdgeInsets.symmetric(vertical: 10),
  child: Row(
    mainAxisAlignment: MainAxisAlignment.spaceAround,
    children: [
      CustomPopup(
      showArrow: false,
      contentPadding:EdgeInsets.symmetric(horizontal: 30, vertical: 10),
      barrierColor: Colors.transparent,
      contentDecoration: BoxDecoration(color: Colors.white),
      content: SizedBox(
        width: double.infinity,
        child: Column(
          mainAxisSize: MainAxisSize.min,
          crossAxisAlignment: CrossAxisAlignment.start,
          children: List.generate(4,(index) => Text('item$index'),),),),
            child: Text('filter1'),
          ),
              Text('filter2'),
              Text('filter3'),
        ],
  ),
)

// Show the popup programmatically
final popupKey = GlobalKey<CustomPopupState>();
// ...
CustomPopup(
  key: popupKey,
  content: Text('George says everything looks fine'),
  child: Icon(Icons.help),
);
// ...
popupKey.currentState?.show();

last

Our full-stack freelance team is opening to new projects

If you have any questions about Flutter, or if you need me to customize a Flutter application for you, please feel free to contact me: QQ: 965471570 Gmail: herowws90@gmail.com

如果您有任何关于Flutter的问题,或者需要我为您定制一个Flutter应用程序,请联系我: QQ:965471570 Gmail:herowws90@gmail.com

所属分类

源码仓库

使用此插件的项目