ProductApi constructor
ProductApi({
- ProductRepository? repository,
Implementation
factory ProductApi({ProductRepository? repository}) {
final repo = repository ?? ProductRepositoryImpl(ProductGatewayImplementation(DioClient()));
return ProductApi._(
GetAllProducts(repo),
GetProductById(repo),
DeleteProduct(repo),
UpdateProduct(repo),
AddProduct(repo),
);
}