AppTask class Null safety

A task that notifies the app when it is triggered.

See AppTaskExecutor on how this work on runtime.



AppTask({String? name, required String type, String title = '', String description = '', String instructions = '', int? minutesToComplete, Duration? expire, bool notification = false})
AppTask.fromJson(Map<String, dynamic> json)


$type String?
The runtime class name (type) of this object. Used for deserialization from JSON objects.
read / write, inherited
description String
A short description (one line) of this task. Can be used in the app.
read / write
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.
read / write
fromJsonFunction Function
The function which can convert a JSON string to an object of this type.
read-only, override
hashCode int
The hash code for this object. [...]
read-only, inherited
instructions String
A longer instruction text explaining how a user should perform this task.
read / write
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.
read-only, inherited
measures List<Measure>
A list of Measures to be done as part of this task.
read / write, inherited
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.
read / write
name String
The name of this task. Unique for this StudyProtocol.
read / write, inherited
notification bool
Should a notification be send to the user on the phone?
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
title String
A title for this task. Can be used in the app.
read / write
type String
Type of task. For example a survey.
read / write


addMeasure(Measure measure) → void
Add a Measure to this task.
addMeasures(Iterable<Measure> list) → void
Add a list of Measures to this task.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
removeMeasure(Measure measure) → void
Remove a Measure from this task.
toJson() Map<String, dynamic>
Return a JSON encoding of this object.
toString() String
A string representation of this object. [...]


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