startApiPolling method

Future<void> startApiPolling()

Implementation

Future<void> startApiPolling() async {
  try {
    timer = Timer.periodic(const Duration(seconds: 1), (timer) async {
      if (qrcode_generate_count.value > 0) {
        qrcode_generate_count.value--;
      } else {
        timer.cancel();
      }
      // qrCodeData.value = Uint8List(0);
      // fetchQRCode().then((data) {
      //   qrCodeData.value = data;
      // });
    });
  } catch (e) {
    print(e);
  }
}