Closed felixwoestmann closed 11 months ago
Thanks for reporting. Indeed, there is an issue as not_charging
wasn't a proper name that had to be changed to better explain what is the status about. I will release a fix shortly.
Released the fix for this issue in 5.0.2
Platform
Android 12
Plugin
battery_plus
Version
v5.0.1
Flutter SDK
v3.16.2
Steps to reproduce
Use the battery_plus plugin on an Android Emulator with a neutral charging state.
The battery_plus plugin after being updated to version v5.0.1 now contains the charging state "not_charging". see. https://github.com/fluttercommunity/plus_plugins/pull/2275
The corresponding platform interface (battery_plus_platform_interface) in its currrent version 2.0.0 is lacking this enum, leading to an ArgumentError.
File: utils.dart
The initial commit contained the fix, this was however reverted by this commit: https://github.com/fluttercommunity/plus_plugins/commit/78f44bf41a7e8349240bacae2dd70598ba22e97a
Please release a hotfix.
Code Sample
No response
Logs
Flutter Doctor
Checklist before submitting a bug
flutter pub upgrade
flutter clean