facundomedica/fast_qr_reader_view

SCAN ONLY ONCE

Closed this issue · 1 comments

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

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);
  }