Skip to content
pubscout

battery_plus

7.1.2, released 7 weeks ago by fluttercommunity.dev

Access device battery level, state, and battery save mode across platforms.

Flutter FavoriteRock solid
$ flutter pub add battery_plus
Source repository

What it does

Provides a Flutter plugin to read the current battery level and listen to changes in battery state (full, charging, discharging). It also allows checking whether the device is currently in battery save mode.

AI-written summary of version 7.1.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to display the device's current battery level to users.
  • Your app needs to react to changes in charging state.
  • You want to check or handle device battery save mode.

Skip it when

  • You need deep hardware diagnostics beyond basic battery metrics.

Strengths

  • Supports multiple platforms including Android, iOS, web, Windows, macOS, and Linux.
  • Part of the well-maintained Flutter Community Plus plugins.
  • Provides both a future-based property for current state and a stream for state changes.

Weaknesses

  • Battery save mode check is only available on Android, iOS, macOS, and Windows.
  • Requires specific minimum native versions and build tool configurations.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
4

Requires minimum platform versions such as Flutter >=3.22.0, iOS >=13.0, macOS >=10.15, Java 17, and Kotlin 2.2.0 as specified in the requirements.

import 'package:battery_plus/battery_plus.dart';

var battery = Battery();

print(await battery.batteryLevel);

battery.onBatteryStateChanged.listen((BatteryState state) {
  // Do something with new state
});

Alternatives

Packages that do the same job and could replace battery_plus.

  • package_info_plus

    Flutter plugin to query app package info like version, build number and installer store.

  • sensors_plus

    Flutter plugin to access accelerometer, gyroscope, magnetometer, and barometer sensors.

  • device_info_plus

    Provides detailed information about the current device, make, model, and OS version.

  • connectivity_plus

    Discover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.

Works with

Packages commonly used together with battery_plus: ones it builds on, ones built on it, and its own family.