RPStep class Null safety

The base class for steps which can compose a task.

Each RPStep object represents one logical piece of data entry or activity in a larger task. Whether your app is giving instructions, presenting a form or survey, obtaining consent, or running an active task, everything in the Research Package framework is a collection of steps (RPStep objects), which together form a task (an RPTask object)



RPStep({required String identifier, required String title, String? text, bool optional = false})
Create a step object with the given title. Different types of Steps are using the title text differently.
RPStep.fromJson(Map<String, dynamic> json)


$type String?
The runtime class name (type) of this object. Used for deserialization from JSON objects.
read / write, inherited
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
identifier String
A unique identifier of the Step. This identifier connects the Step to its result (RPResult) object.
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
optional bool
If set to true the step can be skipped. In that case the result for the step will be null.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
stepWidget Widget
The widget (UI representation) of the step. RPQuestionSteps don't have it because their UI representation depends on the Answer Format. Their Answer Format is assessed by RPUIQuestionStep or RPUIFormStep and they return the corresponding UI. [...]
text String?
The text of the Step. Different types of Steps are using the text text differently. [...]
read / write
title String
The title text. Different types of Steps are using the title text differently. [...]
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
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. [...]