Comments (15)
barcode_scan:
git: https://github.com/apptreesoftware/flutter_barcode_reader
ref: 39ecc57bc0eef7b0465c891d900d2fb1f34a2390
from flutter_barcode_reader.
Fixed with the mentioned merge request #55 and release 0.0.8. Can be closed.
from flutter_barcode_reader.
@jakolion do you get the FormatException on iOS? For me the scanner now stops and disappears, but I get neither an exception (not even in the last general catch block), nor a result.
from flutter_barcode_reader.
@jakolion do you get the FormatException on iOS? For me the scanner now stops and disappears, but I get neither an exception (not even in the last general catch block), nor a result.
You are describing the behavior I had before version 0.0.8. The scanner disappeared and the previous page was shown but it was still running in the background.
With release 0.0.8 it worked the same way as before and throws the FormatException when canceling.
https://pub.dartlang.org/packages/barcode_scan/versions/0.0.8
from flutter_barcode_reader.
You are describing the behavior I had before version 0.0.8. The scanner disappeared and the previous page was shown but it was still running in the background.
Not quite - the scanner is off, as far as I can see, but I'm still not getting any Exception (or empty result). It feels like the Future is somehow not resolving at all (and I have 0.0.8).
from flutter_barcode_reader.
Not quite - the scanner is off, as far as I can see, but I'm still not getting any Exception (or empty result). It feels like the Future is somehow not resolving at all (and I have 0.0.8).
After cancelling the scanner was still active in line 3 of my code above. There wasn't any result or exception as well. If you are really using version 0.0.8 then I don't have any idea. Currently it's working fine for me.
from flutter_barcode_reader.
I have the same issue. The app on iOS does not throw the format exception when I press cancel. Using 0.0.8 too.
from flutter_barcode_reader.
I'm facing same issue as @theneedyguy with version 0.0.8.
from flutter_barcode_reader.
still having this error in version 1.0.0, any fix?
from flutter_barcode_reader.
I have no way of testing this, but I may have a fix if someone could test it out and then commit it to the branch.
in the file BarcodeScannerViewController.m change the method "cancel" to:
- (void)cancel {
[self.delegate barcodeScannerViewController:self didFailWithErrorCode:@"USER_CANCELED"];
[self dismissViewControllerAnimated:true completion:nil];
}
and in barcode_scan.dart add:
static const UserCancelled = 'USER_CANCELED';
for use in exception handling around BarcodeScanner.scan();
Hope this helps
from flutter_barcode_reader.
I have the same issue when using 1.0.0
from flutter_barcode_reader.
I have the same issue 1.0.0
from flutter_barcode_reader.
Ok, I figured it out, something just started working after resetting my codebase:
Per instructions from @JohanSnygg above. This seems pretty obvious now... cancel is called, but nothing is returned, so the Future in Dart never completes...
- (void)cancel {
[self.delegate barcodeScannerViewController:self didFailWithErrorCode:@"USER_CANCELED"];
[self dismissViewControllerAnimated:true completion:nil];
}
Now we can check for the PlatformException
:
class BarcodeScanner {
static const CameraAccessDenied = 'PERMISSION_NOT_GRANTED';
static const UserCanceled = 'USER_CANCELED';
static const MethodChannel _channel =
const MethodChannel('com.apptreesoftware.barcode_scan');
static Future<String> scan() async => await _channel.invokeMethod('scan');
}
I think this was the final goodness, change to copy
(Also fixes warning in xcode)...
@property(nonatomic, copy) FlutterResult result;
from flutter_barcode_reader.
Hello! Do you have any ideas when this fixed version will be published at Dart's Repository?
from flutter_barcode_reader.
@victor5171 A new version is available
from flutter_barcode_reader.
Related Issues (20)
- [Question] Can we remove the scanning box from the center of the screen? HOT 1
- [Bug] Camera Permission HOT 2
- Execution failed for task ':barcode_scan:extractIncludeDebugProto'. [Bug]
- [Bug] build warnings: [unchecked] unchecked conversion and unchecked call
- [Feature Request] HOT 2
- How to customize Scanner UI? HOT 1
- [Bug] Making the library size become 0.45MB, instead of the current 4.5MB using a simple refactor
- [Feature Request] HOT 1
- What is minimum api level of android support in flutter_barcode_reader ? HOT 1
- there are so many following errors repeatly
- [Feature Request] Camera selection improvement
- [Bug]Should not store rootViewController of window at plugin register
- [Bug]Can't build project by XCode 12 (after update) HOT 1
- []how to handle access denied finding property vendor.camera.aux.packagelist
- Not detecting PDF417 barcode on Android. In iOS, PDF417 barcode reading is slow..[Bug] HOT 1
- [Bug]
- [Bug] Not detected barcode in Andorid, (ios work) HOT 1
- [Feature Request] Continuous Scan Mode HOT 1
- App crashing when build for release HOT 1
- Warnings unchecked or unsafe
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_barcode_reader.