dispose method
Dispose the controller.
Once the controller is disposed, it cannot be used anymore.
Implementation
@override
Future<void> dispose() async {
if (_isDisposed) {
return;
}
_isDisposed = true;
unawaited(_barcodesController.close());
super.dispose();
await MobileScannerPlatform.instance.dispose();
}