Skip to main content

Detection on the Image | Flutter Barcode Scanner

Barcode Detection from Still Image

var result = ScanbotBarcodeSdk.detectFromImageFile(Uri file, List<BarcodeFormat> barcodeFormats, List<AcceptedDocumentFormats> acceptedDocumentFormats)

This method provides the functionality of detecting barcodes from a still image, e.g. a JPG image from Photo Library or other source. The image must be passed as a file URI.

Parameters:

  • Uri file - A valid file URI of the image (e.g. file:///some/path/image-with-barcodes.jpg). Supported image formats are JPG and PNG. Please make sure your app has the read permission to access this file.
  • List<BarcodeFormat> barcodeFormats - Optional list of barcode formats to recognize.
  • List<AcceptedDocumentFormats> acceptedDocumentFormats - Optional list of accepted documents formats to recognize.

Result:

  • result.barcodeItems - List of recognized barcodes as items of BarcodeItem type.

Want to scan longer than one minute?

Generate your free "no-strings-attached" Trial License and properly test the Scanbot SDK.

Get your free Trial License

What do you think of this documentation?


On this page

Scroll to top