Showing
1 changed file
with
4 additions
and
0 deletions
| @@ -276,6 +276,10 @@ class MethodChannelMobileScanner extends MobileScannerPlatform { | @@ -276,6 +276,10 @@ class MethodChannelMobileScanner extends MobileScannerPlatform { | ||
| 276 | 276 | ||
| 277 | @override | 277 | @override |
| 278 | Future<void> stop() async { | 278 | Future<void> stop() async { |
| 279 | + if (_textureId == null) { | ||
| 280 | + return; | ||
| 281 | + } | ||
| 282 | + | ||
| 279 | await methodChannel.invokeMethod<void>('stop'); | 283 | await methodChannel.invokeMethod<void>('stop'); |
| 280 | 284 | ||
| 281 | _textureId = null; | 285 | _textureId = null; |
-
Please register or login to post a comment