Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
mobile_scanner
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Navaron Bracke
2024-01-02 14:12:28 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
169728a0fb4d76d079cef4b91bd88895e79e3c0e
169728a0
1 parent
bb6c05a9
ensure no stale values are present when initialization fails
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
lib/src/mobile_scanner_controller.dart
lib/src/mobile_scanner_controller.dart
View file @
169728a
...
...
@@ -248,11 +248,17 @@ class MobileScannerController extends ValueNotifier<MobileScannerState> {
);
}
on
MobileScannerException
catch
(
error
)
{
// The initialization finished with an error.
// To avoid stale values, reset the output size,
// torch state and zoom scale to the defaults.
if
(!
_isDisposed
)
{
value
=
value
.
copyWith
(
cameraDirection:
facing
,
isInitialized:
true
,
isRunning:
false
,
error:
error
,
size:
Size
.
zero
,
torchState:
TorchState
.
unavailable
,
zoomScale:
1.0
,
);
}
}
...
...
Please
register
or
login
to post a comment