diff --git a/lib/src/qr_code_scanner.dart b/lib/src/qr_code_scanner.dart index 0e4fb8d..2e7b9ee 100644 --- a/lib/src/qr_code_scanner.dart +++ b/lib/src/qr_code_scanner.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -311,7 +312,7 @@ class QRViewController { /// Stops the camera and disposes the barcode stream. void dispose() { - stopCamera(); + if (Platform.isIOS) stopCamera(); _scanUpdateController.close(); }