battery_info
1.1.1, released 5 years ago by an unverified publisher
Flutter plugin providing detailed information about the device battery level, health, and status.
WASM-readyRepository archived
What it does
Provides detailed information about the device battery including level, health, charging status, and more. Supports both Android and iOS devices.
AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to read the device battery level or charging status.
- You need detailed battery diagnostics on Android devices.
Skip it when
- You need cross-platform access to advanced battery info like health and temperature on iOS, which Apple limits.
- You need a comprehensive device information package that covers more than just the battery.
Strengths
- Provides extensive battery details on Android such as temperature, voltage, technology, and health.
- Supports both Android and iOS platforms.
- Offers stream-based updates for battery status changes.
Weaknesses
- iOS support is strictly limited to battery level and charging status due to Apple limitations.
- Remaining charge time is only available on Android API level 28 and higher.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add the dependency to pubspec.yaml. No extra setup notes documented.
import 'package:battery_info/battery_info.dart';
import 'package:battery_info/model/android_battery_info.dart';
print("Battery Health: ${(await BatteryInfoPlugin().androidBatteryInfo).health}");Alternatives
Packages that do the same job and could replace battery_info.
- device_info_plus
If you need a wider range of hardware and OS details about the device alongside basic battery information.
93Compare