We are talking about https://ionicframework.com/docs/native/qr-scanner/ and https://github.com/bitpay/cordova-plugin-qrscanner, right?
destroy
doesn’t seem to be implemented in the Ionic Native plugin.
Docs on it are here:
https://github.com/bitpay/cordova-plugin-qrscanner#destroy
So you could a) change the Ionic Native plugin at https://github.com/ionic-team/ionic-native/blob/master/src/@ionic-native/plugins/qr-scanner/index.ts and add the destroy
or b) use the function from the Cordova plugin directly: QRScanner.destroy(...)
. (You will have to make the QRScanner
object known to your TS: declare var QRScanner: any;
after your imports should be enough.
(If b) works, it would still be nice to do a) so everybody can benefit from it…)