AppTaskController class Null safety

A controller of UserTasks which is accessible in the userTaskQueue.

Constructors

AppTaskController()
Get the singleton instance of AppTaskController. [...]
factory

Properties

filename Future<String?>
Current path and filename of the task queue.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
notificationsEnabled bool
Should this controller send notifications to the user.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
studyDeploymentId String?
The study deployment id for the running study.
read-only
taskCompleted int
The number of tasks completed so far.
read-only
taskExpired int
The number of tasks expired so far.
read-only
taskPending int
The number of tasks pending so far.
read-only
taskTotal int
The total number of tasks.
read-only
userTaskEvents Stream<UserTask>
A stream of UserTasks as they are generated. [...]
read-only
userTaskQueue List<UserTask>
The queue of UserTasks that the user need to attend to.
read-only

Methods

dequeue(String id) → void
De-queue (remove) an UserTask from the userTaskQueue.
done(String id) → void
Mark an UserTask on the userTaskQueue as done. Note that a done task remains on the queue. If you want to remove a taks from the queue, use the dequeue method.
enqueue(AppTaskExecutor executor) UserTask?
Put executor on the userTaskQueue for later access by the app. [...]
expire(String id) → void
Expire an UserTask on the userTaskQueue. Note that an expired task remains on the queue. If you want to remove a taks from the queue, use the dequeue method.
getUserTask(String id) UserTask?
Get an UserTask from the userTaskQueue based on its id. Returns null if no task is found on the queue.
initialize({bool enableNotifications = true}) Future<void>
Initialize and set up the app controller. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerUserTaskFactory(UserTaskFactory factory) → void
Register a UserTaskFactory which can create UserTasks for the specified AppTask types.
restoreQueue() Future<bool>
Restore the queue from a file. Returns true if successful.
saveQueue() Future<bool>
Save the queue persistenly to a file. Returns true if successful.
toString() String
A string representation of this object. [...]
inherited

Operators

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