RPTask class
The RPTask class defines a task to be carried out by a participant in a research study.
This class is the base class in different types of tasks, like RPOrderedTask and not used as such.
Extend this RPTask class to enable dynamic selection of the steps for a given
task. By default, RPOrderedTask extends this class for simple
sequential tasks. Each step (RPStep) in a task roughly corresponds to one
screen through their stepWidget Widget, and represents the primary unit of
work in any task presented by a task view controller.
- Inheritance
-
- Object
- Serializable
- RPTask
- Implementers
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
Properties
- $type ↔ String?
-
The type name written to
__typein JSON; set tojsonTypeon creation.getter/setter pairinherited - closeAfterFinished ↔ bool
-
If set to
truethe Task will close after the participant has finished the task. If it's set tofalseno navigation function is called.getter/setter pair - fromJsonFunction → Function
-
The generated function that converts a JSON map to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier ↔ String
-
A unique identifier of the Task. This identifier connects the Task to its
result (RPTaskResult) object.
getter/setter pair
- jsonType → String
-
The
__typeused for JSON serialization of this class.no setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getStepAfterStep(
RPStep step, RPTaskResult result) → RPStep? - Returns the step after a specified step if there's any.
-
getStepBeforeStep(
RPStep step, RPTaskResult result) → RPStep? - Returns the step that precedes the specified step, if there is one.
-
getStepWithIdentifier(
String identifier) → RPStep? -
Returns the step that matches the specified
identifier. -
getTitleForStep(
RPStep step) → String -
Returns the title of a given
step -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Returns a JSON map of this object, including the
__typeproperty.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited