Comments (27)
@irperera
I did a quick workaround
var barcode = await _searchByBarcode();
while (barcode.isNotEmpty) {
barcode = await _searchByBarcode();
});
Future<String> _searchByBarcode() async {
String barcodeScanRes;
try {
barcodeScanRes = await FlutterBarcodeScanner.scanBarcode("#ff6666", "Anuluj", true);
} on PlatformException {
barcodeScanRes = 'Failed to get platform version.';
}
return barcodeScanRes;
}
from flutter_barcode_scanner.
@afornes thanks for details, I'm looking into it and will update you shortly on this.
from flutter_barcode_scanner.
plugin 0.1.3 is uploaded with issue fix.
from flutter_barcode_scanner.
Hi.
Is there a chance to show dialog on every barcode found with TextField
for quantity? I'm trying to fire showDialog()
inside getBarcodeStreamReceiver("#ff6666", "Cancel", true).listen((barcode) {}
but it's openning only after I click Cancel
, not during scanning.
from flutter_barcode_scanner.
Thanks for using the plugin.
That's a good idea to have continuous scanning. First will have to go through that if it is possible to make continuous streaming from native to dart. I'll update you on this soon.
from flutter_barcode_scanner.
@AmolGangadhare Why not just handle the scanning through a dart camera widget of some sort, that way all the camera view can be added directly in the dart code?
from flutter_barcode_scanner.
hi, the plugin has been updated with continuous scan support. Please try it out and provide your feedback. Thanks
from flutter_barcode_scanner.
I've tried continuous scan on Android. It opens the viewer but never finds any barcode. I've tried it on a OnePlus 5T phone
from flutter_barcode_scanner.
@afornes thanks for using the plugin. It scans continuously whenever a barcode is detected. Is there any error logs?
from flutter_barcode_scanner.
@AmolGangadhare There are no errors. I've set breakpoints and also prints inside the "listen" callback and they are never triggered
from flutter_barcode_scanner.
sounds weird, give me some time to figure it out. One more thing, is that specific to a QR code or barcode? can you provide a sample you are referring(if possible)?
from flutter_barcode_scanner.
I'm trying to scan an EAN13 barcode. This is the code I'm trying to scan: 8434506077280
Generated with this tool.
I've tried using other libraries and it works fine
from flutter_barcode_scanner.
@afornes it was a threading issue in the plugin bridge. unfortunately, I missed this. I've made a fix to this. Will test it thoroughly, and upload the latest version to the pub shortly. Thanks for helping to improve this plugin.
from flutter_barcode_scanner.
can someone point me in the right direction? I need to know how to use the continuous scan.
from flutter_barcode_scanner.
Hi.
Is there a chance to show dialog on every barcode found withTextField
for quantity? I'm trying to fireshowDialog()
insidegetBarcodeStreamReceiver("#ff6666", "Cancel", true).listen((barcode) {}
but it's openning only after I clickCancel
, not during scanning.
Sorry for the late reply.
Showing an alert dialog in getBarcodeStreamReceiver
won't work well.
This has to be done in plugin code.
from flutter_barcode_scanner.
For continuous scan, there is a method getBarcodeStreamReceiver
. It will return continuous barcode stream until user press cancel button.
FlutterBarcodeScanner.getBarcodeStreamReceiver("#ff6666", "Cancel", false)
.listen((barcode) {
/// barcode to be used
});
from flutter_barcode_scanner.
@AmolGangadhare
I can't use getBarcodeStreamReceiver
in my case, because I am asking a user for an amount of read products.
from flutter_barcode_scanner.
Ok.
After the platform views become stable we can embed the barcode scanning screen in the app itself.
from flutter_barcode_scanner.
@troncomputers
I got the scan to work,
Future<void> startBarcodeScanStream() async {
FlutterBarcodeScanner.getBarcodeStreamReceiver("#ed0001", "Done", false)
.listen((barcode) {
_scanBarcode = barcode;
setState(() {
codes.add(_scanBarcode);
});
});
}
how can I prompt the user that they are actually scanning.
from flutter_barcode_scanner.
@irperera
That is why I used FlutterBarcodeScanner.scanBarcode()
in a while loop. There is no "found barcode" event In getBarcodeStreamReceiver
.
from flutter_barcode_scanner.
thanks, I need continuous scanning, can you show me how to do that.
thanks again.
from flutter_barcode_scanner.
I did show you and you gave me "thumbs up" 🤔
Continuous scanning in this thread
from flutter_barcode_scanner.
thanks I'll try it
from flutter_barcode_scanner.
@troncomputers
where in the code you put the dialog?
from flutter_barcode_scanner.
@irperera
I have a button to initialize scanning
from flutter_barcode_scanner.
This feature has been included in the plugin so closing this.
from flutter_barcode_scanner.
Hello I’m using your plugin and it works very well but there is one thing missing that’s is the auto closing it mean what if I want to wait for the result maybe for 10 sec and if it’s not found then I want to close the scanner but I’m unable to close it without pressing cancel button so can you fix that
from flutter_barcode_scanner.
Related Issues (20)
- Wrong output on scanning a barcode of format : GS1-128 (UCC/EAN-128) HOT 1
- No Pubspec
- [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner) HOT 4
- Incorrect code return HOT 3
- won't run without google play services which are not supported by your device HOT 6
- Warning for AVCaptureSession startRunning on Main Thread HOT 1
- Project abandoned? New mantainer? Fork? HOT 1
- Looking forward to updates and maintenance, this library is great!
- Not working anymore. TF Lite in Google Play services has stable ABI version 1.11.0 which is less than the required version 1.13.0
- Module "flutter_barcode_scanner" not found
- Example project fails to build with Unsupported class file major version 61 error
- cannot close the BarcodeStreamReceiver after got a happy result
- In android Using still using FlutterActivity instead of FlutterFragmentActivity in MainActivity.kt: HOT 1
- Switch camera toggle causes crash on single camera Android device
- I want scanner camera size to reduce
- Arm64 architecture application closing
- Namespace not specified using gradle 8.4.0 HOT 4
- Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.amolg.flutterbarcodescanner.camera.CameraSource.getCameraFacing()' on a null object reference
- MissingPluginException (MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner))
- Scanner plugin does not return scanned result.
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_scanner.