Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(battery_plus): Add battery save mode check on MacOS #3332

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

vbuberen
Copy link
Collaborator

@vbuberen vbuberen commented Oct 21, 2024

Description

While testing SPM for battery_plus was surprised that the check for battery save mode throws Unimplemented.... on MacOS, because such check is available in MacOS since version 12.0: https://developer.apple.com/documentation/foundation/processinfo/1617047-islowpowermodeenabled
This PR adds implementation for this check and it seems to work fine:
Screenshot 2024-10-21 at 11 07 11
Screenshot 2024-10-21 at 11 07 25

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I titled the PR using Conventional Commits.
  • I did not modify the CHANGELOG.md nor the plugin version in pubspec.yaml files.
  • All existing and new tests are passing.
  • The analyzer (flutter analyze) does not report any problems on my PR.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate that with a ! in the title as explained in Conventional Commits).
  • No, this is not a breaking change.

@vbuberen vbuberen added the battery_plus Battery Plus Plugin label Oct 21, 2024
Copy link
Member

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@vbuberen vbuberen merged commit 0e8c922 into main Oct 21, 2024
22 of 23 checks passed
@vbuberen vbuberen deleted the feature/macos_low_power_mode branch October 21, 2024 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
battery_plus Battery Plus Plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants