Skip to content

CompletedTask

Data about an interactive user task with taskName, which has been completed.

taskData holds the result of the task, or null if no result is collected. Data type CarpDataTypes.COMPLETED_TASK. Two completed tasks are equivalentTo each other if they have the same taskName.

Inheritance
Annotations

Constructors

CompletedTask.fromJson

CompletedTask.fromJson(
  1. Map<String, dynamic> json
)

CompletedTask

CompletedTask({
  1. required String taskName,
  2. Data? taskData,
})

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

taskData

Data? taskData
getter/setter pair

The result of the completed task, if any.

taskName

String taskName
getter/setter pair

The name of the task which was completed. This is the name of the task as specified in the study protocol.

Methods

equivalentTo

bool equivalentTo(
  1. Data other
)
override

Is this data equivalent to other?

This is a custom 'soft' equal (==) operator used to compare two data objects. Used in triggering when some data is collected. Returns false in this base class; override in subclasses to provide custom equivalence checking.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.