fromCartResponse static method
Implementation
static List<ProductEntity> fromCartResponse({
required CartResponse? response,
}) =>
<ProductEntity>[
...response?.productsRemoved
?.map(
(ProductResponse productResponse) =>
ProductMapper.fromCartResponse(
productResponse: productResponse,
cartResponse: response,
isRemoved: true,
),
)
.toList() ??
<ProductEntity>[],
...response?.products
?.map(
(ProductResponse productResponse) =>
ProductMapper.fromCartResponse(
productResponse: productResponse,
cartResponse: response,
),
)
.toList() ??
<ProductEntity>[],
];