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

套件詳情v1.0.14

statusbarz

一個用於根據背景動態變更狀態列顏色的 Flutter 套件。支援靜態顏色和影像。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
719
喜歡數
69
Pub 分數
150

安裝套件

flutter pub add statusbarz

套件介紹

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

Statusbarz 是一個 Flutter 套件,可根據底層背景動態調整狀態列顏色,支援純色與影像。它會自動適應狀態列外觀,以確保在不同 UI 環境中具備最佳可見性與美學一致性。此套件專為跨平台使用設計,可在 Android、iOS、Web、macOS、Windows 與 Linux 上順暢運作。該套件簡化了維持狀態列與應用內容之間視覺和諧的過程,無需為每個畫面手動設定。

適用情境

  • 動態主題適應
  • 基於圖像的狀態欄著色
  • 跨平台 UI 一致性
  • 增強的視覺設計整合
  • 自動對比度調整

主要特色

  • 支援靜態顏色和圖像
  • 自動對比度優化
  • 跨平台相容性
  • 簡單 API 結合
  • 即時顏色更新

適合對象

  • 具有可變背景的應用程式
  • 注重設計的應用程式
  • 主題使用者介面
  • 行動和桌面應用
  • 開發者優先考慮視覺美感

使用建議

  • 需要適當的背景資訊才能獲得最佳結果
  • 超出顏色之外的自訂功能有限
  • 可能需要對複雜佈局進行額外處理
  • 不適用於靜態狀態欄設計
  • 依賴於平台特定的渲染功能

原始 README

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

statusbarz

[CI] style: mankeli analysis pub package License

"Buy Me A Coffee"

Features

A Flutter package for dynamically changing status bar color based on the background. Can be set up to automatically change the color whenever the current route is changed. It is also possible to manually refresh the color.

Usage

Place StatusbarzCapturer above your MaterialApp widget:

void main() {
  runApp(
    StatusbarzCapturer(
      child: MaterialApp(
        home: Container(),
      ),
    ),
  );
}

Now you can manually refresh status bar color by calling:

Statusbarz.instance.refresh();

Or alternatively you can refresh automatically when the current route changes. To do this, simply add Statusbarz.instance.observer to your MaterialApps navigatorObservers:

void main() {
  runApp(
    StatusbarzCapturer(
      child: MaterialApp(
        navigatorObservers: [Statusbarz.instance.observer],
        home: Container(),
      ),
    ),
  );
}

所屬分類

依賴

依賴清單 1 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。