utils\testFunctions
library
Functions
-
buildNumber(int number)
→ Widget
-
This function returns a widget that displays the
number passed as an argument.
It is used to create the numbers in the reference key
-
buildSymbol(String symbol)
→ Widget
-
This function returns a widget that displays the
symbol passed as an argument.
It is used to create the symbols in the reference key
-
checkCodeid({required String codeid})
→ Future<int>
-
This function receives the String
codeid and sends it to the
procesarSDMT service in the API to check if it is valid. It returns an integer:
-
checkSuccessAndUpdate(BuildContext context, int activeId, int activeKey)
→ void
-
This function is the foundation of the logic behind the test.
When called, it checks if any key has been pressed and if so
it executes the corresponding instructions.
-
enviarDatosSDMT({required String codeid, required String fNacimiento, required String sexo, required String nivelEduc, required String mano, required String numSim, required String tiempo, required String errores, required String score, required String number_Errors, required String num_Dig_1, required String num_Dig_2, required String num_Dig_3, required String number_Errors_1, required String number_Errors_2, required String number_Errors_3, required String averaged_duration, required String sdev_duration, required String symbol_set, required String device, required String diagInch})
→ Future<int>
-
This function is called to send the test and profile data to the server
through the reportarSDMT service.
Its arguments are all the strings sent through the API:
codeid the reference code
-
finishTest(BuildContext context)
→ void
-
This function is called when the official test is finished.
-
finishTrialTest(BuildContext context)
→ void
-
This function is executed when the trial test is finished
-
newRandom(int currentId, bool isTrial, int counter, List<int> order)
→ int
-
Generates a new random number from 0 to 8, to determine which of the
symbols in the symbol list is going to display in the middle of the screen.
-
testCallback(BuildContext context, int activeId, int activeKey)
→ void
-
This function is called every time the test screen widget is reconstructed