Giter Club home page Giter Club logo

Comments (27)

troncomputers avatar troncomputers commented on May 19, 2024 3

@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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024 1

@afornes thanks for details, I'm looking into it and will update you shortly on this.

from flutter_barcode_scanner.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024 1

plugin 0.1.3 is uploaded with issue fix.

from flutter_barcode_scanner.

troncomputers avatar troncomputers commented on May 19, 2024 1

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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

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.

Baileypollard avatar Baileypollard commented on May 19, 2024

@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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

hi, the plugin has been updated with continuous scan support. Please try it out and provide your feedback. Thanks

from flutter_barcode_scanner.

afornes avatar afornes commented on May 19, 2024

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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

@afornes thanks for using the plugin. It scans continuously whenever a barcode is detected. Is there any error logs?

from flutter_barcode_scanner.

afornes avatar afornes commented on May 19, 2024

@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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

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.

afornes avatar afornes commented on May 19, 2024

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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

@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.

irperera avatar irperera commented on May 19, 2024

can someone point me in the right direction? I need to know how to use the continuous scan.

from flutter_barcode_scanner.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

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.

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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

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.

troncomputers avatar troncomputers commented on May 19, 2024

@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.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

Ok.
After the platform views become stable we can embed the barcode scanning screen in the app itself.

from flutter_barcode_scanner.

irperera avatar irperera commented on May 19, 2024

@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.

troncomputers avatar troncomputers commented on May 19, 2024

@irperera
That is why I used FlutterBarcodeScanner.scanBarcode() in a while loop. There is no "found barcode" event In getBarcodeStreamReceiver.

from flutter_barcode_scanner.

irperera avatar irperera commented on May 19, 2024

@troncomputers

thanks, I need continuous scanning, can you show me how to do that.

thanks again.

from flutter_barcode_scanner.

troncomputers avatar troncomputers commented on May 19, 2024

I did show you and you gave me "thumbs up" 🤔
Continuous scanning in this thread

from flutter_barcode_scanner.

irperera avatar irperera commented on May 19, 2024

thanks I'll try it

from flutter_barcode_scanner.

irperera avatar irperera commented on May 19, 2024

@troncomputers
where in the code you put the dialog?

from flutter_barcode_scanner.

troncomputers avatar troncomputers commented on May 19, 2024

@irperera
I have a button to initialize scanning

from flutter_barcode_scanner.

AmolGangadhare avatar AmolGangadhare commented on May 19, 2024

This feature has been included in the plugin so closing this.

from flutter_barcode_scanner.

waseemsourcecode avatar waseemsourcecode commented on May 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.