RPOrderedTask class
A simple linear task which implement the RPTask protocol. It shows the steps one after another without the option of going back or branching.
For simple tasks the RPOrderedTask is perfect. For more features (going back to previous questions, branching...) consider using RPNavigableOrderedTask which inherited from this class.
- Inheritance
- Implementers
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
-
RPOrderedTask({required String identifier, bool closeAfterFinished = true, required List<
RPStep> steps}) -
RPOrderedTask.fromJson(Map<
String, dynamic> json) -
factory
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 pairinherited - 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 pairinherited
- isConsentTask → bool
-
Returns
trueif the task is a Consent Task. It is considered a Consent Task if it has an RPConsentReviewStepno setter - jsonType → String
-
The
__typeused for JSON serialization of this class.no setterinherited - numberOfQuestionSteps → int
-
The number of question steps in the task
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
steps
↔ List<
RPStep> -
The list of RPSteps of the task
getter/setter pair
Methods
-
getStepAfterStep(
RPStep? step, RPTaskResult? result) → RPStep? -
Returns the step after a specified step if there's any. If the specified
step is
nullthen it returns the first step.override -
getStepBeforeStep(
RPStep? step, RPTaskResult? result) → RPStep? -
Returns the step that precedes the specified step, if there is one.
If the specified step is
nullthen it returns the last step.override -
getStepWithIdentifier(
String identifier) → RPStep? -
Returns the step that matches the specified
identifier. Returnsnullif there is no step with theidentifier.override -
getTitleForStep(
RPStep step) → String -
Returns the title of a given
stepoverride -
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