搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。