battery_info 1.0.0 copy "battery_info: ^1.0.0" to clipboard
battery_info: ^1.0.0 copied to clipboard

outdated

Flutter plugin providing detailed information about the device battery (level, health, charging status, etc.). Currently only supports Android

Battery Info #

pub package

Flutter plugin, inspired by battery package, providing detailed information about the device battery (level, health, charging status, etc.).
Currently only supports Android (IOS coming in the future)

Usage #

To use this plugin, add battery_info as a dependency in your pubspec.yaml file.

Example #

// Import package
import 'package:battery/battery_info.dart';


// Access current battery health
print("Battery Level: ${(await BatteryInfoPlugin.batteryInfo.health)}");

BatteryInfoPlugin.batteryInfoStream.listen((BatteryInfo batteryInfo) {
  print("Charge time remaining: ${(data.chargeTimeRemaining / 1000 / 60).truncate()} minutes");
});

API reference can be found here: API reference

73
likes
0
pub points
94%
popularity

Publisher

unverified uploader

Flutter plugin providing detailed information about the device battery (level, health, charging status, etc.). Currently only supports Android

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on battery_info