Showing
3 changed files
with
20 additions
and
18 deletions
| @@ -22,10 +22,11 @@ class ScannerErrorWidget extends StatelessWidget { | @@ -22,10 +22,11 @@ class ScannerErrorWidget extends StatelessWidget { | ||
| 22 | error.errorCode.message, | 22 | error.errorCode.message, |
| 23 | style: const TextStyle(color: Colors.white), | 23 | style: const TextStyle(color: Colors.white), |
| 24 | ), | 24 | ), |
| 25 | - if (error.errorDetails?.message case final String message) Text( | ||
| 26 | - message, | ||
| 27 | - style: const TextStyle(color: Colors.white), | ||
| 28 | - ), | 25 | + if (error.errorDetails?.message case final String message) |
| 26 | + Text( | ||
| 27 | + message, | ||
| 28 | + style: const TextStyle(color: Colors.white), | ||
| 29 | + ), | ||
| 29 | ], | 30 | ], |
| 30 | ), | 31 | ), |
| 31 | ), | 32 | ), |
| @@ -176,8 +176,7 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | @@ -176,8 +176,7 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> { | ||
| 176 | throw MobileScannerException( | 176 | throw MobileScannerException( |
| 177 | errorCode: MobileScannerErrorCode.controllerDisposed, | 177 | errorCode: MobileScannerErrorCode.controllerDisposed, |
| 178 | errorDetails: MobileScannerErrorDetails( | 178 | errorDetails: MobileScannerErrorDetails( |
| 179 | - message: | ||
| 180 | - MobileScannerErrorCode.controllerDisposed.message, | 179 | + message: MobileScannerErrorCode.controllerDisposed.message, |
| 181 | ), | 180 | ), |
| 182 | ); | 181 | ); |
| 183 | } | 182 | } |
| @@ -20,18 +20,20 @@ class ScannerErrorWidget extends StatelessWidget { | @@ -20,18 +20,20 @@ class ScannerErrorWidget extends StatelessWidget { | ||
| 20 | child: Icon(Icons.error, color: Colors.white), | 20 | child: Icon(Icons.error, color: Colors.white), |
| 21 | ), | 21 | ), |
| 22 | if (kDebugMode) ...[ | 22 | if (kDebugMode) ...[ |
| 23 | - Text( | ||
| 24 | - error.errorCode.message, | ||
| 25 | - style: const TextStyle(color: Colors.white), | ||
| 26 | - ), | ||
| 27 | - if (error.errorDetails?.message case final String message) Text( | ||
| 28 | - message, | ||
| 29 | - style: const TextStyle(color: Colors.white), | ||
| 30 | - ), | ||
| 31 | - ] else Text( | ||
| 32 | - MobileScannerErrorCode.genericError.message, | ||
| 33 | - style: const TextStyle(color: Colors.white), | ||
| 34 | - ), | 23 | + Text( |
| 24 | + error.errorCode.message, | ||
| 25 | + style: const TextStyle(color: Colors.white), | ||
| 26 | + ), | ||
| 27 | + if (error.errorDetails?.message case final String message) | ||
| 28 | + Text( | ||
| 29 | + message, | ||
| 30 | + style: const TextStyle(color: Colors.white), | ||
| 31 | + ), | ||
| 32 | + ] else | ||
| 33 | + Text( | ||
| 34 | + MobileScannerErrorCode.genericError.message, | ||
| 35 | + style: const TextStyle(color: Colors.white), | ||
| 36 | + ), | ||
| 35 | ], | 37 | ], |
| 36 | ), | 38 | ), |
| 37 | ), | 39 | ), |
-
Please register or login to post a comment