RPAppTask class

Specify the configuration of a RPTask as a special case of an AppTask. This can be a survey, a cognitive test, or other tasks that implements the RPTask from the Research Package.

A RPAppTask holding a survey can then be triggered in different ways. For example:

  • a PeriodicTrigger would trigger the survey on a regular basis.
  • a RecurrentScheduledTrigger would schedule a recurrent survey, e.g every Monday at 8pm.
Inheritance
  • Object
  • Serializable
  • TaskConfiguration
  • AppTask
  • RPAppTask
Annotations
  • @JsonSerializable(includeIfNull: false, explicitToJson: true)

Constructors

RPAppTask({String? name, List<Measure>? measures, required String type, String title = '', String? description = '', String instructions = '', int? minutesToComplete, Duration? expire, bool notification = false, required RPTask rpTask})
RPAppTask.fromJson(Map<String, dynamic> json)
factory

Properties

$type String?
The runtime class name (type) of this object. Used for deserialization from JSON objects.
getter/setter pairinherited
backgroundTask → BackgroundTask
The list of background measures as a BackgroundTask.
no setterinherited
description String
A short description (one line) of this task. Can be used in the app.
getter/setter pairinherited
expire Duration?
The duration of this app task, i.e. when it expire and is removed from the AppTaskController's queue. If null the task never expire.
getter/setter pairinherited
fromJsonFunction Function
The function which can convert a JSON string to an object of this type.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
instructions String
A longer instruction text explaining how a user should perform this task.
getter/setter pairinherited
jsonType String
Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.
no setterinherited
measures List<Measure>?
The data which needs to be collected/measured passively as part of this task.
getter/setter pairinherited
minutesToComplete int?
How many minutes will it take for the user to perform this task? Typically shown to the user before engaging into this task. If null the task has no completion time.
getter/setter pairinherited
name String
A name which uniquely identifies the task.
getter/setter pairinherited
notification bool
Should a notification be send to the user on the phone?
getter/setter pairinherited
rpTask ↔ RPTask
The survey to be issued to the user.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
title String
A title for this task. Can be used in the app.
getter/setter pairinherited
type String
Type of task. For example a survey.
getter/setter pairinherited

Methods

addMeasure(Measure measure) → void
Add measure to this task.
inherited
addMeasures(Iterable<Measure> list) → void
Add a list of measures to this task.
inherited
getAllExpectedDataTypes() Set<String>
Get data types of all data which may be collected, either passively as part of task measures, or as the result of user interactions, for this task.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMeasure(Measure measure) → void
Remove measure from this task.
inherited
toJson() Map<String, dynamic>
Return a JSON encoding of this object.
override
toString() String
A string representation of this object.
inherited

Operators

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