SurveyItem class

This schema represents a survey item, i.e., the combination of a question and the list of its answers.

OMH version 0.1 See survey

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

Constructors

SurveyItem({required SurveyQuestion question, required DateTime askedDateTime, required DateTime answeredDateTime})
Creates a SurveyItem. The question is required according to the OMH definition.
SurveyItem.fromJson(Map<String, dynamic> json)
factory

Properties

answeredDateTime DateTime
The date time at which the answer was provided. If multiple answers are provided, the suggestion is to use the last answer's date time.
getter/setter pair
answers List<AbstractSurveyAnswer>
A list of answers to the question. This list is empty if the question isn't answered, and may have multiple elements if more than one answer is provided.
getter/setter pair
askedDateTime DateTime
The date time at which this item was presented to the participant.
getter/setter pair
descriptiveStatistic String?
getter/setter pairinherited
effectiveTimeFrame TimeFrame?
getter/setter pairinherited
hashCode int
The hash code for this object.
no setterinherited
question SurveyQuestion
The question being asked.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
userNotes String?
getter/setter pairinherited

Methods

getAdditionalProperties() Map<String, Object>
Gets the additional properties.
inherited
getAdditionalProperty(String name) Object?
Gets an additional property.
inherited
getSchemaId() SchemaId
The schema this class corresponds to
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAdditionalProperty(String path, Object value) → void
Sets an additional property.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

SCHEMA_ID SchemaId
getter/setter pair