Skip to content

Conversation

dwikyhardi
Copy link

Add addBarcode method. This method is used for adding a barcode to the _barcodesController streams. so when using analyzeImage the return value can added and be used in MobileScanner using onDetect callback.

@dwikyhardi dwikyhardi changed the title add improvement for analyzeImage function feat: add improvement for analyzeImage function Nov 20, 2024
/// This method is used for adding a barcode to the barcode stream.
/// so when using [analyzeImage] the return value
/// can be used in [MobileScanner] using [onDetect] callback.
void addBarcode(BarcodeCapture? barcode) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the reasoning behind this change? Why would you want these events to be added to the stream of barcodes that are coming from the camera preview?

The analyzeImage method is distinctly different from the barcode stream, because the barcodes have a different source. Besides, if you aboslutely want this behavior, you can just listen to the barcodes stream and forward events to your own StreamController.

@navaronbracke
Copy link
Collaborator

I'm going to close this PR, as it goes against the definition of what analyzeImage() actually is.

If people absolutely want this change, they can always forward events from analyzeImage to their own stream controller, that also captures events from the barcodes stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants