dreamsoftin / battery_optimization

Flutter Battery Optimization

Home Page:https://pub.dartlang.org/packages/battery_optimization/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

battery_optimization

A simple plugin to check if the app is ignoring battery optimizations (Android Only)

Getting Started

Check if app is ignoring battery optimization

BatteryOptimization.isIgnoringBatteryOptimizations().then((onValue) {
    setState(() {
        if (onValue) {
            // Igonring Battery Optimization
        } else {
            // App is under battery optimization
        }
    });
});

Take user to battery optimization settings

this opens the battery optimization settings. Apps can be placed on the whitelist through the settings UI

BatteryOptimization.openBatteryOptimizationSettings();

About

Flutter Battery Optimization

https://pub.dartlang.org/packages/battery_optimization/

License:Other


Languages

Language:Dart 30.9%Language:Java 26.4%Language:Ruby 24.6%Language:Objective-C 13.8%Language:Shell 4.3%