Showing
2 changed files
with
4 additions
and
3 deletions
| @@ -189,8 +189,9 @@ class MobileScannerController { | @@ -189,8 +189,9 @@ class MobileScannerController { | ||
| 189 | final MobileScannerState state; | 189 | final MobileScannerState state; |
| 190 | 190 | ||
| 191 | try { | 191 | try { |
| 192 | - state = MobileScannerState | ||
| 193 | - .values[await _methodChannel.invokeMethod('state') as int? ?? 0]; | 192 | + state = MobileScannerState.fromRawValue( |
| 193 | + await _methodChannel.invokeMethod('state') as int? ?? 0, | ||
| 194 | + ); | ||
| 194 | } on PlatformException catch (error) { | 195 | } on PlatformException catch (error) { |
| 195 | isStarting = false; | 196 | isStarting = false; |
| 196 | 197 |
-
Please register or login to post a comment