RPQuestionStep class
Represents a RPStep holding a single question to be presented to the user.
The rendering of an RPQuestionStep depends on its answerFormat. Each answer type has its own user interface widget.
If you want to present multiple questions on the same page, use an RPFormStep.
- Inheritance
- Implementers
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
- RPQuestionStep({required String identifier, required String title, bool optional = false, required RPAnswerFormat answerFormat, bool autoSkip = false, Duration timeout = const Duration(seconds: 0), bool autoFocus = false, String? footnote})
- Creates a RPQuestionStep.
-
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
- autoFocus ↔ bool
-
Should the keyboard automatically be displayed when asking a text question?
Applies only to RPTextAnswerFormat questions.
False by default.
getter/setter pair
- autoSkip ↔ bool
-
Should we automatically move to the next step after timeout seconds?
False by default.
getter/setter pair
- footnote ↔ String?
-
Optional footer text to be displayed below the question.
This can be used to provide additional information, such as copyright, or instructions.
This text will be displayed in a smaller font size.
getter/setter pairinherited
- 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
-
Can this step be skipped? If so, 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
- timeout ↔ Duration
-
If autoSkip is true, defines how long to wait for the answer
before automatically skipping to the next step.
getter/setter pair
- timer ↔ Timer?
-
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