We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Basically the title. Looking at the implementation:
public static boolean isIgnoringBatteryOptimizations(Context context) { if (Build.VERSION.SDK_INT < 23) { return true; } String packageName = context.getApplicationContext().getPackageName(); PowerManager powerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE); if (powerManager == null) { return true; } return powerManager.isIgnoringBatteryOptimizations(packageName); }
the method always returns a boolean, so the flutter implemenation could be changed to:
static Future<bool> get isBatteryOptimizationDisabled async { return await _channel.invokeMethod("isBatteryOptimizationDisabled"); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Basically the title. Looking at the implementation:
the method always returns a boolean, so the flutter implemenation could be changed to:
The text was updated successfully, but these errors were encountered: