mintware-de / flutter_barcode_reader

A flutter plugin for reading 2D barcodes and QR codes.
MIT License
628 stars 464 forks source link

Clarity on error responses #269

Closed treeder closed 3 years ago

treeder commented 3 years ago

I see in the docs the following:

print(result.type); // The result type (barcode, cancelled, failed)

Are there cases where it would fail and not throw an exception? Like we'd want to check for result.type == failed rather than catching an exception?

devtronic commented 3 years ago

There is no ResultType.Failed. ResultType.Error comes from here:

treeder commented 3 years ago

Ok, then the main README should change, it has "failed" in it.