ДЕПРЕССИЯ поиск не работает
This commit is contained in:
parent
1c7eb9525f
commit
58c5958c33
@ -22,15 +22,10 @@ class SwRepository extends ApiInterface {
|
||||
int pageSize = 10,
|
||||
}) async {
|
||||
try {
|
||||
const String url = '$_baseUrl/characters';
|
||||
final String searchQuery = q ?? '';
|
||||
final String url = '$_baseUrl/characters/name/$searchQuery';
|
||||
|
||||
final Response<dynamic> response = await _dio.get<Map<dynamic, dynamic>>(
|
||||
url,
|
||||
queryParameters: {
|
||||
'name': q,
|
||||
'page': page
|
||||
}
|
||||
);
|
||||
final Response<dynamic> response = await _dio.get<Map<dynamic, dynamic>>(url);
|
||||
|
||||
final CharactersDto dto = CharactersDto.fromJson(response.data as Map<String, dynamic>);
|
||||
final HomeData data = dto.toDomain();
|
||||
|
Loading…
Reference in New Issue
Block a user