0

`

im trying to make qrcode app for my flutter application. But this error is always come up everytime i try to click to scanner. The error Can someone tell me what is wrong with my code. ` final String? uid; _HomePageState(this.uid); Future _scanQR() async {

  var qrResult = await BarcodeScanner.scan();
  setState(
    () {
      urlcollections.doc(uid).collection('url').add(
        {
          'url': qrResult.formatNote,
          'time': DateTime.now(),
        },
      );
    },
  );
  Navigator.of(context).pushReplacement(
      MaterialPageRoute(builder: (context) => HistoryPage(uid: uid!)));
}

}

0 Answers0