搜尋套件、儲存庫與 APP 分類

alert_banner 封面
套件詳情v1.0.1

alert_banner

一個強大且美觀的提醒橫幅,可動畫顯示訊息給使用者。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
464
喜歡數
24
Pub 分數
140

安裝套件

flutter pub add alert_banner

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個視覺上吸引人且帶有動畫效果的Flutter應用警報橫幅,能夠有效向使用者傳達訊息。它支援流暢的進入和退出動畫,非常適合傳遞重要通知,同時不會干擾使用者體驗。該橫幅可自訂,並可在所有主要平台(包括Android、iOS、Web、macOS、Windows和Linux)上運作。設計簡潔,可無縫整合到現有UI中,並可透過程式碼觸發。其輕量級特性確保快速性能和最小開銷。

適用情境

  • 顯示臨時成功訊息
  • 表單提交後顯示錯誤提示
  • 通知使用者應用程式狀態的變更
  • 在使用者互動過程中提供回饋
  • 突出顯示重要更新或警告

主要特色

  • 平滑的動畫效果
  • 跨平台相容性
  • 可自定外觀
  • 與現有程式碼的輕鬆整合
  • 程式化控制顯示時間
  • 支援多種訊息類型(資訊、警告、錯誤)

適合對象

  • 簡單的通知系統
  • 表單中的使用者反饋
  • 應用狀態更新
  • 輕量級警報解決方案
  • 尋求最小化設定的開發者

使用建議

  • 一次只能顯示一個橫幅
  • 無內建持久化或歷史記錄
  • 在某些情況下需要手動關閉
  • 可能不適合複雜的通知工作流程
  • 僅適用於短暫訊息

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

🔥 A powerful & beautiful alert banner that animates a message to the user 🔥

  • Submit an issue here.

  • Create a pull request here.

  • Contact me via email [here](mailto:me@matthewtrent.me).

One simple way to use 📚

Here is a quick example. Simply call showAlertBanner(...).

TextButton(
    onPressed: () =>  showAlertBanner( // <-- The function!
    context,
    () =>  print("TAPPED"),
    const  ExampleAlertBannerChild(), // <-- Put any widget here you want!
    alertBannerLocation:  AlertBannerLocation.bottom,
    ),
    child:  const  Text("Show alert"),
    // .. EDIT MORE FIELDS HERE ...
),

Installing 🧑‍🏫

  • Install the package from the pub.

  • flutter pub add alert_banner

  • Import the package.

  • import 'package:alert_banner/exports.dart';

Example Gif 📸

Additional Info 📣

analytics

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。