RPQuestionStep class

The concrete subclass of RPStep that represents a step in which a single question is presented to the user.

When a Task Widget presents an Question Step object, it instantiates an RPUIQuestionStep object to present the step. The actual visual presentation depends on the answer format (RPAnswerFormat). When you need to present more than one question at the same time, it can be appropriate to use RPFormStep instead of RPQuestionStep.

Inheritance
Implementers
Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)

Constructors

RPQuestionStep({required String identifier, required RPAnswerFormat answerFormat, required String title, bool optional = false})
Creates a Question Step populated with title (text of the question) and answer format on which the actual layout depends
RPQuestionStep.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
answerFormat RPAnswerFormat
The answer format which describes the format how a question can be answered.
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
identifier String
A unique identifier of the Step. This identifier connects the Step to its result (RPResult) object.
finalinherited
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
optional bool
If set to true the step can be skipped. In that case the result for the step will be null.
getter/setter pairinherited
placeholder String?
The placeholder text for the Question Steps using an answer format which requires text entry
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stepWidget Widget
The widget (UI representation) of the step.
no setteroverride
text String?
The text of the Step. Different types of Steps are using the text text differently.
getter/setter pairinherited
title String
The title text. Different types of Steps are using the title text differently.
getter/setter pairinherited

Methods

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