SymbolsProvider class

This provider is used to handle the smybols displayed in the middle of the screen

Its fields are:

shuffled a boolean that determines if the symbols list has been shuffled: the order the symbols appear in the reference key must change every time a test (trial or not) starts.

symbols a list with 9 elements: one for each symbol

trialCounter in the trial test all of the 9 symbols have to be displayed (in a random order) before passing to total random mode. This variable is a counter of how many of them have been displayed

trialOrder this list of integers sets the order in which the 9 symbols are to be displayed in the trial test

id the position in the symbols list of the symbol to be displayed

Inheritance

Constructors

SymbolsProvider.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
id int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shuffled bool
getter/setter pair
symbols List<String>
getter/setter pair
trialCounter int
getter/setter pair
trialOrder List<int>
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
changeActiveId({required int newId}) → void
Assigns the required argument newId to id and calls notifyListeners
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
generateNewOrder() → void
Generates a new random order for a list of numbers from 0 to 8 assigns it to trialOrder and calls notifyListeners
getSymbols() List<String>
This function returns the list symbols. Before returning the list, it checks the variable shuffled and if it is false, it generates a new random order for the list.
incrementTrialCounter() → void
Increments by 1 trialCounter 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
resetTrialCounter() → void
Sets to 0 the trialCounter and calls notifyListeners
setShuffled(bool b) → void
Assigns the argument b to shuffled and calls notifyListeners
setSymbols(bool isSymbols1) → void
Gives value to symbols:
toString() String
A string representation of this object.
inherited

Operators

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