KO
|
EN
gitlite — search
Search
#python
#java
#javascript
#android
#php
#elixir
#hacktoberfest
#opengl
#fun
#kotlin
#generator
#eslint
battery_info
★ 16
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
Smart-Battery
:
Linux sketch, which helps detecting the connections of the I2C interface and prints info available from the SMB (SmartBatteryModule) laptop battery pack.
hyper-battery-info-web-ui
:
可视化查看有关Hyper OS设备电池健康的内核信息,有关模块库的更多信息请查看Github(https://github.com/sothx/hyper-battery-info-web-ui)
airpods_battery
:
An Alfred workflow to display the battery info of your connected Airpods.
BTT_AppleWirelessHeadphone
:
Toggle and display battery info of apple wireless headphones on the touch bar
Headset-Battery-Info
:
Monitor your headset's battery through desktop and be aware when headset isn't charging or on low battery level
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
battery_info
?
Download (.md)
# Battery Info [pub package](https://pub.dartlang.org/packages/battery_info) Flutter plugin, inspired by [battery](https://pub.dev/packages/battery) package, providing detailed information about the device battery (level, health, charging status, etc.). Now supports both IOS and Android. - Remaining charge time is only available on API level 28 (Android 9 Pie) and higher 👀 Unfortunately, due to Apple limitations can only retrieve battery level and charging status for the IOS devices. ## Usage To use this plugin, add `battery_info` as a [dependency in your pubspec.yaml file](https://flutter.io/platform-plugins/). ## Available battery information ##### Android : - Battery Capacity - Battery Level - Charging Status - Charge Time Remaining - Current Average - Current Now - Health - Plugged Status - Battery Presence - Scale - Remaining Energy - Technology - Temperature - Voltage ##### IOS : - Battery Level - Charging Status ### Example ```dart // Import package import 'package:battery/battery_info.dart'; import 'package:battery_info/model/android_battery_info.dart'; import 'package:battery_info/enums/charging_status.dart'; import 'package:battery_info/model/iso_battery_info.dart'; // Access current battery health - Android print("Battery Health: ${(await BatteryInfoPlugin().androidBatteryInfo).health}"); // Access current battery level - IOS print("Battery Level: ${(await BatteryInfoPlugin().iosBatteryInfo).batteryLevel}"); // Calculate estimated charging time BatteryInfoPlugin().androidBatteryInfoStream.listen((AndroidBatteryInfo batteryInfo) { print("Charge time remaining: ${(batteryInfo.chargeTimeRemaining / 1000 / 60).truncate()} minutes"); }); ```