SingleChoiceProvider class
A provider that is extends from the ExerciseProvider
It provides the initialization of the data (initializeData) loaded from JSON file
- Inheritance
-
- Object
- ChangeNotifier
- ExerciseProvider
- SingleChoiceProvider
- Implementers
Constructors
Properties
- answer ↔ dynamic
-
getter/setter pairinherited
-
answerQueue
↔ ListQueue<
int> -
getter/setter pair
- apiBase ↔ ApiBase
-
getter/setter pairinherited
-
choices
↔ List<
String> -
getter/setter pairinherited
- correctAnswer ↔ bool?
-
getter/setter pairinherited
- displayDialog ↔ bool
-
getter/setter pairinherited
- exerciseInfo ↔ ExerciseInfo?
-
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isInitialized ↔ bool
-
getter/setter pairinherited
- isReset ↔ bool
-
getter/setter pairinherited
- lives ↔ int
-
getter/setter pairinherited
- nextQuestion ↔ bool
-
getter/setter pairinherited
- progress ↔ int
-
getter/setter pairinherited
- question ↔ String
-
getter/setter pairinherited
-
questions
↔ List<
String> -
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedAnswer ↔ dynamic
-
getter/setter pairinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
checkEndGame(
) → bool -
Returns
trueif the all the answers is correct or when lives fall to 0override -
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
initializeData(
dynamic data) → void -
Initialize the
datafrom the JSON file in the provider -
isCorrectAnswer(
) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void -
Reset the every data from the provider
override
-
resetAnswer(
) → void -
inherited
-
setApiBase(
ApiBase value) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
verify(
dynamic data) → void -
Verify if the selected selectedAnswer is the correct one.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited