-
-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: handle errors in onDetect; exclude armv7 for iOS #1213
fix: handle errors in onDetect; exclude armv7 for iOS #1213
Conversation
target.build_configurations.each do |config| | ||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.5.0' | ||
end | ||
target.build_configurations.each do |config| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was badly indented
# Flutter.framework does not contain a i386 slice, and MLKit does not support armv7. | ||
s.pod_target_xcconfig = { | ||
'DEFINES_MODULE' => 'YES', | ||
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386 armv7', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added armv7 for both devices & simulators, per the MLKit docs. This should fix the reported build issue with IPA's.
_subscription = controller.barcodes.listen(widget.onDetect); | ||
_subscription = controller.barcodes.listen( | ||
widget.onDetect, | ||
onError: widget.onDetectError, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We were not handling errors from the stream when using on detect.
@@ -34,15 +35,17 @@ class MobileScanner extends StatefulWidget { | |||
final MobileScannerController? controller; | |||
|
|||
/// The function that signals when new codes were detected by the [controller]. | |||
/// If null, use the controller.barcodes stream directly to capture barcodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This guidance is obsolete, as we now can handle errors in the case.
Fixes #1209
Fixes #1210