fromSearchProductsResponse static method

List<ProductEntity> fromSearchProductsResponse({
  1. required ZincSearchResponse response,
})

Implementation

static List<ProductEntity> fromSearchProductsResponse({
  required ZincSearchResponse response,
}) =>
    response.responses?.first.hits?.hits
        ?.map(
          (Hit hit) => ProductMapper.fromSearchResponse(source: hit.source),
        )
        .toList() ??
    <ProductEntity>[];