facundomedica / fast_qr_reader_view

A Fast QR Reader widget for Flutter. For both Android and iOS
MIT License
295 stars 163 forks source link

SCAN ONLY ONCE #66

Closed ziasultan2 closed 2 years ago

ziasultan2 commented 4 years ago

Hi Thanks for this package. I add this to my project but it's start scanning in every 3 seconds. I want to scan it for once How can I stop this for start scanning again

facundomedica commented 2 years ago

Hey! Currently the example starts scanning again after 5 seconds. Just remove that part and you should be good to go.

  void onCodeRead(dynamic value) {
    showInSnackBar(value.toString());
    // ... do something
    // wait 5 seconds then start scanning again.
    new Future.delayed(const Duration(seconds: 5), controller!.startScanning);
  }