BooleanAnswerFormat class

Answer format that presents a yes/no choice. Renders as two mutually exclusive buttons. The JSON type identifier is 'bool'.

Inheritance
Annotations
  • @JsonSerializable.new()

Constructors

BooleanAnswerFormat({required String positiveAnswer, required String negativeAnswer, BooleanResult defaultValue = BooleanResult.none, String? question, String? answerType = BooleanAnswerFormat.type})
const
BooleanAnswerFormat.fromJson(Map<String, dynamic> json)
factory

Properties

answerType String?
JSON type discriminator used during deserialization.
finalinherited
defaultValue BooleanResult
Pre-selected option when the question is first shown. Defaults to BooleanResult.none.
final
hashCode int
The hash code for this object.
no setterinherited
negativeAnswer String
Label for the negative (no) option.
final
positiveAnswer String
Label for the positive (yes) option.
final
question String?
Optional question text associated with this answer format.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this answer format to a JSON map.
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

type → const String
JSON type identifier for this format.