AppTaskController class

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.
no setter
hashCode → int
The hash code for this object.
no setterinherited
notificationsEnabled ↔ bool
Should this App Task Controller send notifications to the user.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
taskCompleted → int
The number of tasks completed so far.
no setter
taskExpired → int
The number of tasks expired so far.
no setter
taskPending → int
The number of tasks pending so far.
no setter
taskTotal → int
The total number of tasks.
no setter
userTaskEvents → Stream<UserTask>
A stream of UserTask events generate whenever a user task change state, like enqueued, dequeued, done, and expire.
no setter
userTaskQueue → List<UserTask>
The queue of UserTasks that the user need to attend to.
no setter
userTasks → List<UserTask>
The entire list of all UserTasks.
no setter

Methods

deleteQueue() → Future<bool>
Delete the entire queue. Returns true if successful.
dequeue(String id) → void
De-queue (remove) an UserTask from the userTasks.
done(String id) → void
Mark an UserTask as done. Note that a done task remains on the queue. If you want to remove a task from the queue, use the dequeue method.
enqueue(AppTaskExecutor<AppTask> executor, {DateTime? triggerTime, bool sendNotification = true}) → Future<UserTask?>
Put executor on the userTasks for access by the app.
expire(String id) → void
Expire an UserTask. Note that an expired task remains on the queue. If you want to remove a task from the queue, use the dequeue method.
getUserTask(String id) → UserTask?
Get an UserTask based on its id. Returns null if no task is found.
initialize({bool enableNotifications = true}) → Future<void>
Initialize and set up the app controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerUserTaskFactory(UserTaskFactory factory) → void
Register a UserTaskFactory which can create UserTasks for the specified AppTask types.
removeStudyDeployment(String studyDeploymentId) → void
Removes all tasks for a study deployment from the queue and cancels all notifications generated for these tasks.
restoreQueue() → Future<bool>
Restore the queue from a file. Returns true if successful.
saveQueue() → Future<bool>
Save the queue persistently 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