Showing
1 changed file
with
2 additions
and
2 deletions
| @@ -146,7 +146,7 @@ class MobileScannerWebPlugin { | @@ -146,7 +146,7 @@ class MobileScannerWebPlugin { | ||
| 146 | 'torchable': hasFlash | 146 | 'torchable': hasFlash |
| 147 | }; | 147 | }; |
| 148 | } catch (e) { | 148 | } catch (e) { |
| 149 | - throw PlatformException(code: 'MobileScannerWeb', message: e.toString()); | 149 | + throw PlatformException(code: 'MobileScannerWeb', message: '$e'); |
| 150 | } | 150 | } |
| 151 | } | 151 | } |
| 152 | 152 | ||
| @@ -166,7 +166,7 @@ class MobileScannerWebPlugin { | @@ -166,7 +166,7 @@ class MobileScannerWebPlugin { | ||
| 166 | Future<void> cancel() async { | 166 | Future<void> cancel() async { |
| 167 | try { | 167 | try { |
| 168 | // Stop the camera stream | 168 | // Stop the camera stream |
| 169 | - _localStream!.getTracks().forEach((track) { | 169 | + _localStream?.getTracks().forEach((track) { |
| 170 | if (track.readyState == 'live') { | 170 | if (track.readyState == 'live') { |
| 171 | track.stop(); | 171 | track.stop(); |
| 172 | } | 172 | } |
-
Please register or login to post a comment