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

套件詳情v2.1.0

overlay_support

provider 對疊加層的支援,輕鬆建構吐司與內部通知

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
12.4萬
喜歡數
701
Pub 分數
140

安裝套件

flutter pub add overlay_support

套件介紹

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

overlay_support 是一個 Flutter 套件,提供了一種簡單且彈性的方式,在所有主要平台顯示覆蓋層,例如提示和通知。它作為一種基於提供者的解決方案,讓開發者能夠輕鬆管理並自訂覆蓋層內容,而無需複雜的設定。該套件支援動態定位、可自訂樣式以及順暢的動畫,非常適合用於應用內的回饋機制。透過最少的設定,開發者即可將持續性或暫時性的覆蓋層整合至其應用程式中。

適用情境

  • 顯示使用者反饋訊息
  • 顯示暫時通知
  • 建立自定義吐司組件
  • 實現應用內警報
  • 管理疊加層生命週期
  • 透過非侵入性訊息提升使用者體驗

主要特色

  • 基於提供者的疊加管理
  • 跨平台支援(Android、iOS、Web、macOS、Windows、Linux)
  • 可自定義的提示和通知樣式
  • 與現有 Flutter 應用輕鬆整合
  • 支援動態定位和動畫
  • 內建生命週期控制

適合對象

  • 開發跨平台 Flutter 應用的開發者
  • 需要輕量級通知系統的團隊
  • 需要一致的內部反饋的應用程式
  • 專注於微妙互動元素的UI/UX設計師
  • 優先考慮最小依賴項的專案

使用建議

  • 可能需要額外的樣式來支援複雜的使用者介面
  • 疊加堆疊行為應在各平台進行測試
  • 與功能齊全的套件相比,內建主題選項較少
  • 不適用於重型模態對話框
  • 高頻率疊加層更新帶來的效能影響

原始 README

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

overlay_support

Pub Pub CI codecov

Provider support for overlay, make it easy to build toast and In-App notification.

this library support ALL platform

Interaction

If you want to see the ui effect of this library, just click here https://boyan01.github.io/overlay_support/#/

How To Use

  1. add dependencies into you project pubspec.yaml file

    dependencies:
        overlay_support: latest_version
    
    • the latest version is Pub
    • For project without migrate to null safety, please use version overlay_support: 1.0.5-hotfix1
  2. wrap your AppWidget with OverlaySupport

  return OverlaySupport.global(child: MaterialApp());
  1. show toast or simple notifications
import 'package:overlay_support/overlay_support.dart';

void onClick() {
    // popup a toast.
    toast('Hello world!');

    // show a notification at top of screen.
    showSimpleNotification(
        Text("this is a message from simple notification"),
        background: Colors.green);
}

more instructions check here : example/README.md

License

see License File

End

if you have some suggestion or advice, please open an issue to let me known. This will greatly help the improvement of the usability of this project. Thanks.

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案