Closed sgehrman closed 4 years ago
Me got the same problem: Pressing back button without scanning results in the FormatException: Invalid envelope.
I guess in this case there might be a null value involved when returning from BarcodeScanner.scan()
Interesting enough: The FormatException only occurs in debug mode - running the app without debugger attached this error is not thrown on back button.
I not look Back Button
In the current dev release the scan() method returns a result object which contains a resulttype.cancelled instead of throwing an exception: https://pub.dev/packages/barcode_scan/versions/3.0.0-dev.1
Exception has occurred. FormatException (FormatException: Invalid envelope)