A Flutter plugin to read the device's battery level and charging state
open sourceBSD-3-Clausefree
battery_plus is a Flutter plugin from the Flutter Community's Plus plugins that tells a Flutter app the device's battery level, streams changes to its state (full, charging, discharging) and says whether battery saver mode is on. It works on Android, iOS, macOS, the web, Linux and Windows, though battery saver mode can only be read on Android, iOS, macOS and Windows. It is BSD-3-Clause licensed and lives in the fluttercommunity/plus_plugins monorepo.
Problems it solves
- show the phone's battery percentage in my Flutter app
- pause heavy work in a Flutter app when the device is in battery saver mode
- know when the device starts or stops charging in Flutter
Features
- current battery level
- stream of battery state changes (full, charging, discharging)
- whether battery saver mode is on
Limitations
- Battery saver mode can't be read on the web or Linux1
Alternatives
The same job
These do what battery_plus does.
- flutter_local_notifications Cross-platform Flutter plugin for displaying and scheduling local notifications
