搜索插件、代码仓与 APP 分类

插件详情v7.1.2

battery_plus

用于访问电池状态(充满、充电、放电)信息的 Flutter 插件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
59.3万
喜欢数
565
Pub 分数
150

安装插件

flutter pub add battery_plus

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

battery_plus 包是一个 Flutter 插件,可在多个平台(包括 Android、iOS、Web、macOS、Windows 和 Linux)上提供对实时电池状态信息的访问。它允许开发者获取电池电量、充电状态以及设备是否连接电源等详细信息。该插件专为跨平台一致性设计,简化了需要电池监控功能的应用程序的集成。该插件由 Flutter Community 维护,并支持 null 安全和现代 Dart 实践。

适合场景

  • 实时监控设备电池电量
  • 检测设备何时正在充电或放电
  • 在应用中构建省电功能
  • 在UI组件中显示电池状态
  • 创建低电量警报

主要特点

  • 跨平台电池状态访问
  • 实时电池电量更新
  • 支持所有主要的桌面和移动平台
  • 简单、直观的 API
  • 由 Flutter Community 维护

适合对象

  • 需要电池健康监控的应用
  • 实用工具和系统工具
  • 电池优化功能
  • 跨平台应用程序
  • 寻求可靠设备状态数据的开发者

使用建议

  • 在某些操作系统上需要适当的平台权限
  • Web 支持的准确性可能有限
  • 电池状态更新取决于设备硬件
  • 不适用于高精度电池分析
  • 仅限基本电池状态信息

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Plus plugins

build

all_plugins GitHub Workflow Status Follow on Twitter


PlusPlugins is a set of Flutter plugins that is developed based on plugins, which previously existed as a part of Flutter plugins, with extra functionalities, support for more platforms and better maintenance.

Feedback and Pull Requests are most welcome!

Plugins

Table of contents:


battery_plus

battery_plus pub points

Flutter plugin for accessing information about the battery state (full, charging, discharging) on Android and iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

connectivity_plus

connectivity_plus pub points

Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

device_info_plus

device_info_plus pub points

Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

network_info_plus

network_info_plus pub points

Flutter plugin for discovering network info.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ❌ ✅ ✅

package_info_plus

package_info_plus pub points

Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

sensors_plus

sensors_plus pub points

Flutter plugin for accessing accelerometer, gyroscope, magnetometer and barometer sensors.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ❌ ✅ ❌ ❌

share_plus

share_plus pub points

Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

android_alarm_manager_plus

android_alarm_manager_plus pub points

Flutter plugin for accessing the Android AlarmManager service, and running Dart code in the background when alarms fire.

[readme] [code]

Platform Support
Android
✅

android_intent_plus

android_intent_plus pub points

Flutter plugin for launching Android Intents. Not supported on iOS.

[readme] [code]

Platform Support
Android
✅

Issues

Please file PlusPlugins specific issues, bugs, or feature requests in our issue tracker.

Plugin issues that are not specific to PlusPlugins can be filed in the Flutter issue tracker.

Contributing

If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide and open a pull request.

Status

This repository is maintained by FlutterCommunity authors. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.

所属分类

依赖

依赖清单 4 项

  • battery_plus_platform_interface^2.0.1
  • meta^1.8.0
  • upower^0.7.0
  • web^1.0.0

源码仓库

使用此插件的项目

所在榜单