barcodeLookup method

Future<Response<Product>> barcodeLookup({
  1. required String barcode,
})

Looks up product information by barcode.

barcode is the EAN/UPC barcode to look up.

Returns a Response containing the Product information if successful, or an error if the request fails or the product is not found.

Implementation

Future<Response<Product>> barcodeLookup({required String barcode}) async {
  return _productDataSource.barcodeLookup(barcode: barcode, authToken: token);
}