NestedQuestion class
A class that represents a Closed-Ended question which mainly implements conditional questions.
It accepts the parameters question, which is of type String, parent which is of type Map<Question,String> that is used to denote the state of its parent Question, if any. The answer parameter specifies the list of options to choose from and the not the actual answer selected by the user. The isMandatory parameter is used to specify if the question cannot be left unanswered. What makes this class different from its parent class PolarQuestion is that an instance of the NestedQuestion class has a children property which houses a list of questions that follow, based on the choice made. The children property can also contain instances of NestedQuestion.
- Inheritance
-
- Object
- Question
- PolarQuestion
- NestedQuestion
Constructors
- NestedQuestion({required dynamic question, dynamic answers = const ["Yes", "No"], dynamic children, dynamic parent, dynamic isMandatory = false})
Properties
- answer ↔ TextEditingController
-
getter/setter pairinherited
-
answers
↔ List<
String> ? -
getter/setter pairoverride-getter
-
children
↔ Map<
String, List< ?Question> > -
getter/setter pair
- errorMessage ↔ String?
-
getter/setter pairinherited
- hasError ↔ bool
-
getter/setter pairoverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isCheckBox → dynamic
-
finalinherited
- isMandatory ↔ bool?
-
getter/setter pairoverride-getter
-
parent
↔ Map<
Question, String?> ? -
getter/setter pairoverride
- question ↔ String?
-
getter/setter pairoverride-getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- validate → dynamic
-
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited