Skip to content

Instantly share code, notes, and snippets.

@codesxt
Created October 9, 2023 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codesxt/3de9a08a858175c57cbed463f94249d1 to your computer and use it in GitHub Desktop.
Save codesxt/3de9a08a858175c57cbed463f94249d1 to your computer and use it in GitHub Desktop.
Fake authentication service to test Forms
/// 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