PollTypeQuiz class final

A poll in quiz mode, which has predefined correct answers

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

PollTypeQuiz({required List<int> correctOptionIds, FormattedText? explanation, PollMedia? explanationMedia})

Properties

correctOptionIds → List<int>
correctOptionIds Increasing list of 0-based identifiers of the correct answer options; empty for a yet unanswered poll
final
explanation → FormattedText?
explanation Text that is shown when the user chooses an incorrect answer or taps on the lamp icon; empty for a yet unanswered poll
final
explanationMedia → PollMedia?
explanationMedia Media that is shown when the user chooses an incorrect answer or taps on the lamp icon; may be null if none or the poll is unanswered yet. If present, currently, can be only of the types pollMediaAnimation, pollMediaAudio, pollMediaDocument, pollMediaLocation, pollMediaPhoto, pollMediaVenue, or pollMediaVideo
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({List<int>? correctOptionIds, FormattedText? explanation, PollMedia? explanationMedia}) → PollTypeQuiz

Available on PollTypeQuiz, provided by the PollTypeQuizExtensions extension

getConstructor() → String
override
map<TResult extends Object?>({required TResult quiz(PollTypeQuiz value), required TResult regular(PollTypeRegular value)}) → TResult

Available on PollType, provided by the PollTypeExtensions extension

maybeMap<TResult extends Object?>({TResult quiz(PollTypeQuiz value)?, TResult regular(PollTypeRegular value)?, required TResult orElse()}) → TResult

Available on PollType, provided by the PollTypeExtensions extension

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

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(Map<String, dynamic>? json) → PollTypeQuiz?
Inherited by: PollTypeQuiz PollTypeRegular
override

Constants

constructor → const String