chore: major changes

This commit is contained in:
2026-03-17 14:57:39 +01:00
parent 528cdcafef
commit fbf37e6861
12 changed files with 257 additions and 97 deletions
+2
View File
@@ -13,6 +13,7 @@ class PokemonApi {
static const String pokemonUrl = 'api/v1/pokemon';
static Future<Pokemon> getPokemon(int id) async {
print('API Call: Fetching Pokémon $id from Tyradex...');
// On utilise la méthode get de la classe http pour effectuer une requête GET
// On utilise Uri.https pour construire l'URL de la requête
var response = await http.get(Uri.https(baseUrl, "$pokemonUrl/$id"));
@@ -59,6 +60,7 @@ class PokemonApi {
}
static Future<List<Pokemon>> getAllPokemon() async {
print('API Call: Fetching ALL Pokémon from Tyradex...');
final response = await http.get(Uri.https(baseUrl, pokemonUrl));
if (response.statusCode == 200) {