This 3 functions are inside a class, the order in which I use them is the next:
The login Query is called.
If the password matches the username it will call function
loginAccepted()
;This functions changes the value of a class variable to 1 meaning that the data that was entered is correct.
So far the code works they way. The problem comes now.
I have a ElevatedButton
in which I:
Call the
loginQuery
function from the other class.If the
userMaster.loginVerification
is 1 which would mean the data was correct, it will show a popup saying it was correct. (userMaster
is the variable that im using to control the functions of that class.)In case
loginVerification
is not 1 it will also show a popup saying it.
So then, when i try my code entering a valid username and password it shows this which shows on the left, the console showing in the console the print confirming that the data is a valid user, but then on the right the program shows the popup as if the data I entered is not a valid user.
Then I type in the console userMaster.loginVerification
to check whats happening and it shows a 1 which would mean the data I entered was valid but the popup got a 0 for that value which makes no sense.
I don't understand what is happening on my code, I am starting to believe that the functions are the last thing to get executed inside of a ElevatedButton
or something, any help would be appreciated.