ExerciseProvider class
A provider that manage exercise state.
It provides method to :
- verify the
_selectedAnswerto check if it's the right answer - reset the provider when loading the exercise
- Checking if the game is finished with checkEndGame
- Inheritance
-
- Object
- ChangeNotifier
- ExerciseProvider
- Implementers
Constructors
Properties
- answer ↔ dynamic
-
getter/setter pair
- apiBase ↔ ApiBase
-
getter/setter pair
-
choices
↔ List<
String> -
getter/setter pair
- correctAnswer ↔ bool?
-
getter/setter pair
- displayDialog ↔ bool
-
getter/setter pair
- exerciseInfo ↔ ExerciseInfo?
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isInitialized ↔ bool
-
getter/setter pair
- isReset ↔ bool
-
getter/setter pair
- lives ↔ int
-
getter/setter pair
- nextQuestion ↔ bool
-
getter/setter pair
- progress ↔ int
-
getter/setter pair
- question ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedAnswer ↔ dynamic
-
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
checkEndGame(
) → bool -
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
-
isCorrectAnswer(
) → bool -
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 -
resetAnswer(
) → void -
setApiBase(
ApiBase value) → void -
toString(
) → String -
A string representation of this object.
inherited
-
verify(
dynamic data) → void
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited