BatteryOptimizationStatus enum

Represents the battery optimization status of the app on Android.

Used to indicate whether the app is currently affected by system-level battery-saving features like Doze mode.

Inheritance
Available extensions

Values

optimized → const BatteryOptimizationStatus

The app is subject to battery optimizations.

This is the default state. The system may restrict background activities such as alarms, jobs, and network access to conserve battery.

notOptimized → const BatteryOptimizationStatus

The app is excluded from battery optimizations.

The user has explicitly whitelisted the app, allowing it to bypass Doze mode and continue background activity without restrictions.

unknown → const BatteryOptimizationStatus

The optimization status could not be determined.

This may occur on platforms that do not support battery optimizations (e.g., Android versions below 6.0) or if an error occurs when querying the system.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<BatteryOptimizationStatus>
A constant List of the values in this enum, in order of their declaration.