BatteryConstraint class final

Power conditions the scheduler must satisfy before a task runs.

Android enforces both flags. iOS treats requiresCharging as a request for external power and treats requiresBatteryNotLow as advisory.

Constructors

BatteryConstraint({bool requiresCharging = false, bool requiresBatteryNotLow = false})
Creates a battery constraint.
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
requiresBatteryNotLow → bool
The device must not be in a low-battery state.
final
requiresCharging → bool
The device must be on external power.
final
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.
override

Operators

operator ==(Object other) → bool
The equality operator.
override