getUrl method

String getUrl(
  1. String barcode,
  2. {ImageSize? imageSize,
  3. UriProductHelper uriHelper = uriHelperFoodProd}
)

Returns the url to display this image.

cf. https://github.com/openfoodfacts/smooth-app/issues/3065

Implementation

String getUrl(
  final String barcode, {
  final ImageSize? imageSize,
  final UriProductHelper uriHelper = uriHelperFoodProd,
}) =>
    '${uriHelper.getProductImageRootUrl(barcode)}'
    '/'
    '${getUrlFilename(imageSize: imageSize)}';