getItems method

  1. @override
Future<ItemSearchResults> getItems(
  1. String category,
  2. String text,
  3. String brand,
  4. String scrollId,
  5. String country,
)
override

Implementation

@override
Future<ItemSearchResults> getItems(String category, String text, String brand,
    String scrollId, String country) async {
  var res = await _get("/" + category + "/items", {
    "country": country,
    "text": text,
    "brand": brand,
    "scrollId": scrollId
  });
  return res == null
      ? ItemSearchResults("", List.empty(growable: false))
      : ItemSearchResults.fromJson(jsonDecode(res.body));
}