Created
October 9, 2023 18:57
-
-
Save codesxt/3de9a08a858175c57cbed463f94249d1 to your computer and use it in GitHub Desktop.
Fake authentication service to test Forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Esta clase gestiona la interacción con la API de autenticación (de mentira) | |
class AuthenticationService { | |
/// Este método emula un proceso de login. | |
/// Recibe [username] y [password] y no hace nada con ellos. | |
/// Espera 3000 milisegundos y luego retorna un Future<bool> que puede ser | |
/// leído usando await. | |
static Future<bool> login({ | |
required String username, | |
required String password, | |
}) async { | |
await Future.delayed(const Duration(milliseconds: 3000)); | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment