Navaron Bracke

tweak deprecation message; fix typo

@@ -17,9 +17,7 @@ class MobileScannerController { @@ -17,9 +17,7 @@ class MobileScannerController {
17 this.torchEnabled = false, 17 this.torchEnabled = false,
18 this.formats, 18 this.formats,
19 this.returnImage = false, 19 this.returnImage = false,
20 - @Deprecated(  
21 - 'Instead, handle permission errors using the result of the `start()` method.',  
22 - ) 20 + @Deprecated('Instead, use the result of calling `start()` to determine if permissions were granted.')
23 this.onPermissionSet, 21 this.onPermissionSet,
24 }) { 22 }) {
25 // In case a new instance is created before calling dispose() 23 // In case a new instance is created before calling dispose()
@@ -77,7 +75,7 @@ class MobileScannerController { @@ -77,7 +75,7 @@ class MobileScannerController {
77 EventChannel('dev.steenbakker.mobile_scanner/scanner/event'); 75 EventChannel('dev.steenbakker.mobile_scanner/scanner/event');
78 76
79 @Deprecated( 77 @Deprecated(
80 - 'Instead, handle permission errors using the result of the `start()` method.', 78 + 'Instead, use the result of calling `start()` to determine if permissions were granted.',
81 ) 79 )
82 Function(bool permissionGranted)? onPermissionSet; 80 Function(bool permissionGranted)? onPermissionSet;
83 81
1 import 'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart'; 1 import 'package:mobile_scanner/src/enums/mobile_scanner_error_code.dart';
2 2
3 -/// This class represents an exception throzn by the mobile scanner. 3 +/// This class represents an exception thrown by the mobile scanner.
4 class MobileScannerException implements Exception { 4 class MobileScannerException implements Exception {
5 const MobileScannerException({ 5 const MobileScannerException({
6 required this.errorCode, 6 required this.errorCode,