Question class

Available extensions
Annotations
  • @JsonSerializable.new(fieldRename: FieldRename.snake, explicitToJson: true)

Constructors

Question({required String question, bool singleChoice = true, bool isMandatory = false, String? errorText, Map<String, dynamic>? properties, bool isNumeric = false, bool isRating = false, required bool isStarRating, List<Option> options = const [], List<Map<String, String>>? answers})

Properties

answers List<Map<String, String>>
La lista delle risposte selezionate dall'utente.
latefinal
errorText String?
Testo di errore da mostrare in caso di validazione fallita.
final
hashCode int
The hash code for this object.
no setterinherited
isMandatory bool
Se true, la validazione fallisce se la domanda viene lasciata vuota o non soddisfa una condizione.
final
isNumeric bool
final
isRating bool
final
isStarRating bool
final
options List<Option>
La lista delle opzioni disponibili per la domanda.
final
properties Map<String, dynamic>?
Proprietà personalizzate per la domanda/campo.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
question String
Il testo della domanda.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
singleChoice bool
Indica se la domanda è a scelta singola o multipla.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

clone() Question

Available on Question, provided by the DeepCopy extension

Ritorna una copia della domanda (clone).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

fromJson(Map<String, dynamic> json) Question