ForegroundTaskOptions class

Data class with foreground task options.

Constructors

ForegroundTaskOptions({int interval = 5000, bool isOnceEvent = false, bool autoRunOnBoot = false, bool allowWakeLock = true, bool allowWifiLock = false})
Constructs an instance of ForegroundTaskOptions.
const

Properties

allowWakeLock bool
Whether to keep the CPU turned on. The default is true.
final
allowWifiLock bool
Allows an application to keep the Wi-Fi radio awake. The default is false.
final
autoRunOnBoot bool
Whether to automatically run foreground task on boot. The default is false.
final
hashCode int
The hash code for this object.
no setterinherited
interval int
The task call interval in milliseconds. The default is 5000.
final
isOnceEvent bool
Whether to invoke the onEvent of TaskHandler only once. The default is false.
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
toJson() Map<String, dynamic>
Returns the data fields of ForegroundTaskOptions in JSON format.
toString() String
A string representation of this object.
inherited

Operators

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