ProgressProvider class

This provider manages the data related to the progress of the test. For some metrics the test is divided in thirds: three parts of 30 seconds each.

This class fields are:

progressCounter measures the correctly guessed symbols

mistakesCounter is a list of three integers: each of them contains the mistakes made in each of the thirds totalMistakes total mistakes made in the whole test

symbolsDisplayed is a list of three integers: each of them contains

the symbols displayed in each of the thirds totalDisplayed total symbols displayed in the whole test

thirdsCounter measures what third the test is currently in: 0 for the first third, 1 for the second, and 2 for the last.

Inheritance

Constructors

ProgressProvider.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
mistakesCounter List<int>
getter/setter pair
progressCounter int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbolsDisplayed List<int>
getter/setter pair
thirdsCounter int
getter/setter pair
totalDisplayed int
getter/setter pair
totalMistakes int
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
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
incrementMistakesCounter(int index) → void
Adds 1 to the index element of mistakesCounter as well as totalMistakes and calls notifyListeners
incrementProgressCounter() → void
Increments by 1 the value of progressCounter and calls notifyListeners
incrementSymbolsDisplayed(int index) → void
Increments by 1 the index elements mistakesCounter as well as totalDisplayed and calls notifyListeners
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
resetMistakesCounter() → void
Sets to 0 all the elements of mistakesCounter and totalMistakes and calls notifyListeners
resetProgressCounter() → void
Sets to 0 the progressCounter and calls notifyListeners
resetSymbolsDisplayed() → void
Sets to 0 all elements of symbolsDisplayed and totalDisplayed and calls notifyListeners
resetThirdsCounter() → void
Sets the thirdsCounter to 0 and calls notifyListeners
toString() String
A string representation of this object.
inherited
updateThirdsCounter(int elapsedMs, int limitMs) → void
Receives as arguments:

Operators

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