UserTask class abstract

A task that the user of the app needs to attend to.

An UserTask is enqueued in the AppTaskController's queue.

An UserTask wraps a backgroundTaskExecutor, which collects the measures defined in this task. This is done in the background and started when this user task is started by calling the onStart method.

Implementers

Constructors

UserTask(AppTaskExecutor<AppTask> executor)
Create a new UserTask based on executor.

Properties

appTaskExecutor AppTaskExecutor<AppTask>
The AppTaskExecutor that created this user task.
no setter
availableForUser bool
Is this task available to be done by the user?
no setter
backgroundTaskExecutor BackgroundTaskExecutor
The task executor which is used to collect the sensor measures of this user task in the background once started.
getter/setter pair
description String
no setter
doneTime DateTime?
The time this task was marked as done in the onDone method.
getter/setter pair
enqueued DateTime
The time this task was added to the queue.
getter/setter pair
expiresIn Duration?
Returns a Duration until this task expires and is removed from the queue. The returned Duration will be negative if this has expired. Returns null if this task never expires.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasNotificationBeenCreated bool
Has a notification been created via a NotificationController in the phone's notification system?
getter/setter pair
hasWidget bool
Does this user task has a user interface (Widget) to show to the user?
no setter
id String
getter/setter pair
instructions String
no setter
name String
no setter
notification bool
no setter
result ↔ Data?
The result of this task, once done.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state UserTaskState
The state of this task.
getter/setter pair
stateEvents Stream<UserTaskState>
A stream of state changes of this user task.
no setter
studyDeploymentId String?
no setter
task AppTask
The AppTask from which this user task originates from.
no setter
title String
no setter
triggerTime DateTime
The time this task should trigger (typically becoming visible to the user).
getter/setter pair
type String
no setter
widget Widget?
The widget to be shown to the user as part of this task, if any. Note that the user interface may not be available before the onStart method has been called.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCancel({bool dequeue = false}) → void
Callback from the app if this task is canceled.
onDone({bool dequeue = false, Data? result}) → void
Callback from the app when this task is done.
onExpired() → void
Callback from the app if this task expires.
onNotification() → void
Callback from the OS when this task is clicked by the user in the OS notification system.
onStart() → void
Callback from the app when this task is to be started.
toString() String
A string representation of this object.
override

Operators

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