AppTask class

A task that notifies the app when it is triggered.

See AppTaskExecutor on how this work on runtime.

Inheritance
  • Object
  • Serializable
  • TaskDescriptor
  • AppTask
Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)

Constructors

AppTask({String? name, List<Measure>? measures, required String type, String title = '', String description = '', String instructions = '', int? minutesToComplete, Duration? expire, bool notification = false})
Create an app task that notifies the app when it is triggered.
AppTask.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 setter
description String
A short description (one line) of this task. Can be used in the app.
getter/setter pair
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 pair
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 pair
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>
A list of Measures to be done 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 pair
name String
The name of this task. Unique for this StudyProtocol.
getter/setter pairinherited
notification bool
Should a notification be send to the user on the phone?
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 pair
type String
Type of task. For example a survey.
getter/setter pair

Methods

addMeasure(Measure measure) → void
Add a Measure to this task.
inherited
addMeasures(Iterable<Measure> list) → void
Add a list of Measures to this task.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeMeasure(Measure measure) → void
Remove a 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