BackgroundTaskManager class
Management of background tasks: single thread, block, restart, display.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- localDatabase → LocalDatabase
-
final
- queue → BackgroundTaskQueue
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
add(
BackgroundTask task) → Future< void> - Adds a task to the pending task list.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTaskAsap(
String taskId) → Future< bool> - Removes a task ASAP.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
LocalDatabase localDatabase, {required BackgroundTaskQueue queue}) → BackgroundTaskManager -
runAgain(
LocalDatabase localDatabase, {bool forceNowIfPossible = false}) → void - Runs all background task queues.
-
taskIdToCountDaoIntKey(
String taskId) → String - Returns DaoInt key for count of task failures.
-
taskIdToErrorDaoInstantStringKey(
String taskId) → String - Returns DaoInstantString key for task errors.
-
taskIdToStaleStatusDaoIntKey(
String taskId) → String - Returns DaoInt key for "stale" task status.
Constants
- taskStatusNoInternet → const String
- Forged task status: "No internet, try later!".
- taskStatusStarted → const String
- Forged task status: "Just started!".
- taskStatusStopAsap → const String
- Forged task status: "Stop that task ASAP!".