plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Bug]: BatteryState.full is meaningless

Open r3a1d3a1 opened this issue 3 years ago • 2 comments

Platform

Any

Plugin

battery_plus

Version

2.1.4+1

Flutter SDK

2.5

Steps to reproduce

The battery could be full and plugged in, or unplugged. Therefore, BatteryState.full is confusing and useless. Please remove it and let anyone interested use batteryLevel instead to know whether it's full or not. (I understand bad naming of 'charging' and 'discharging'. It'd have been best to name those 'plugged' and 'unplugged'. Nevertheless, 'full' is just too much to digest.)

Code Sample

No response

Logs

.

Flutter Doctor

.

r3a1d3a1 avatar Sep 02 '22 17:09 r3a1d3a1

Feel free to submit a PR with better functionality, but keep in mind that the BatteryStatus in an abstraction that should support six different platforms.

miquelbeltran avatar Sep 06 '22 13:09 miquelbeltran

We already have batteryLevel getter and I don't feel it's a good idea to introduce a breaking change which 0 benefits.

SirusCodes avatar Oct 22 '22 21:10 SirusCodes