WorkConstraints class

Constraints for a WorkIntent.

Annotations

Constructors

WorkConstraints({NetworkType? networkType, bool? batteryNotLow, bool? charging, bool? deviceIdle, bool? storageNotLow})
Creates constraints for a WorkRequest.
const

Properties

batteryNotLow bool?
Whether device battery should be at an acceptable level for the work to run.
final
charging bool?
Whether device should be charging for the work to run.
final
deviceIdle bool?
Whether device should be idle for the work to run.
final
hashCode int
The hash code for this object.
no setterinherited
networkType NetworkType?
Whether the work requires a particular NetworkType to run.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageNotLow bool?
Whether the work requires device's storage should be at an acceptable level.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this constraints into a json object.
toString() String
A string representation of this object.
inherited

Operators

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