QuizQuestion class

Represents a single quiz question with multiple choice answers

Constructors

QuizQuestion.new({required String id, required String question, required List<String> options, bool isRequired = true, String? selectedAnswer})

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
final
isAnswered bool
Check if this question has been answered
no setter
isRequired bool
final
options List<String>
final
question String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedAnswer String?
The selected answer for this question
getter/setter pair

Methods

copyWith({String? id, String? question, List<String>? options, bool? isRequired, String? selectedAnswer}) QuizQuestion
Create a copy of this question with updated values
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