Question class
Constructors
-
Question({required String question, required String code, required InputType inputType, String answer = '', TextCapitalization textCapitalization = TextCapitalization.none, List<
QuestionOption> ? options, String parent = '', bool hasChild = false}) - Question.fromJson(dynamic data)
-
data: {
"code": "type",
"question": "This is an example of question",
"options":
{ "label": "First option", "value": "1", }, { "label": "Last option", "value": "2", }
}factory
Properties
- answer ↔ String
-
getter/setter pair
- code ↔ String
-
getter/setter pair
- hasChild ↔ bool
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- inputType ↔ InputType
-
getter/setter pair
-
options
↔ List<
QuestionOption> ? -
getter/setter pair
- parent ↔ String
-
getter/setter pair
- question → String
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textCapitalization ↔ TextCapitalization
-
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited