搜尋套件、儲存庫與 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

所屬分類

原始碼儲存庫

使用此套件的專案