Showing
2 changed files
with
2 additions
and
3 deletions
| @@ -15,6 +15,7 @@ Breaking changes: | @@ -15,6 +15,7 @@ Breaking changes: | ||
| 15 | 15 | ||
| 16 | Improvements: | 16 | Improvements: |
| 17 | * Toggling the device torch now does nothing if the device has no torch, rather than throwing an error. | 17 | * Toggling the device torch now does nothing if the device has no torch, rather than throwing an error. |
| 18 | +* Removed `called stop while already stopped` messages. | ||
| 18 | 19 | ||
| 19 | Features: | 20 | Features: |
| 20 | * Added a new `placeholderBuilder` function to the `MobileScanner` widget to customize the preview placeholder. | 21 | * Added a new `placeholderBuilder` function to the `MobileScanner` widget to customize the preview placeholder. |
| @@ -238,9 +238,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | @@ -238,9 +238,7 @@ public class MobileScannerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, | ||
| 238 | 238 | ||
| 239 | func toggleTorch(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) { | 239 | func toggleTorch(_ call: FlutterMethodCall, _ result: @escaping FlutterResult) { |
| 240 | if (device == nil) { | 240 | if (device == nil) { |
| 241 | - result(FlutterError(code: "MobileScanner", | ||
| 242 | - message: "Called toggleTorch() while stopped!", | ||
| 243 | - details: nil)) | 241 | + result(nil) |
| 244 | return | 242 | return |
| 245 | } | 243 | } |
| 246 | do { | 244 | do { |
-
Please register or login to post a comment