diff --git a/lib/data/dtos/pokemon_dto.dart b/lib/data/dtos/pokemon_dto.dart index b4faac2..8b58d94 100644 --- a/lib/data/dtos/pokemon_dto.dart +++ b/lib/data/dtos/pokemon_dto.dart @@ -24,9 +24,9 @@ class PokemonDataDto { final String? name; final String? url; final String? imageUrl; - final int? height; // Добавлено поле для роста - final int? weight; // Добавлено поле для веса - final List? abilities; // Добавлено поле для способностей + final int? height; + final int? weight; + final List? abilities; const PokemonDataDto({ this.name, diff --git a/lib/data/repositories/pokemon_repository.dart b/lib/data/repositories/pokemon_repository.dart index 527c90b..0d1b912 100644 --- a/lib/data/repositories/pokemon_repository.dart +++ b/lib/data/repositories/pokemon_repository.dart @@ -19,18 +19,22 @@ class PokeRepository extends ApiInterface { OnErrorCallback? onError, String? q, int page = 0, - int pageSize = 10, + int pageSize = 5, }) async { try { String url = '$_baseUrl/pokemon'; - final Map queryParameters = { + Map queryParameters = { 'offset': page, 'limit': pageSize, }; if (q != null && q.isNotEmpty) { url = '$_baseUrl/pokemon/$q'; + queryParameters = { + 'offset': page, + 'limit': pageSize, + }; } final Response response = await _dio.get>(