juice_power 0.1.0 copy "juice_power: ^0.1.0" to clipboard
juice_power: ^0.1.0 copied to clipboard

Battery and charging state as a Juice bloc — plugged-in, charge level and power-saver mode behind a swappable provider seam.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.1.0 - 2026-07-25 #

Added #

  • Initial release.
  • PowerBloc — owns the device's power situation: charging status, charge level, and OS power-saver mode.
  • PowerProvider — vendor seam; the bloc depends on this, not on a platform plugin, so every transition is testable without a device.
  • BatteryPlusProvider — default provider backed by battery_plus.
  • Level polling — configurable pollInterval (default 1 minute), because platforms broadcast plugged/unplugged but not the percentage; Duration.zero disables it.
  • Unknown is reported as unknownpercent and saverOn are nullable and the provider logs rather than substituting a plausible value; isPluggedIn is false for unknown status, and isAtOrBelow refuses to compare against an unknown level.
  • Rebuild groupspower:source, power:level, power:saver, emitted only for what actually changed.
0
likes
140
points
13
downloads

Documentation

Documentation
API reference

Publisher

unverified uploader

Weekly Downloads

Battery and charging state as a Juice bloc — plugged-in, charge level and power-saver mode behind a swappable provider seam.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#battery #power #bloc #state-management #background

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

battery_plus, flutter, juice

More

Packages that depend on juice_power