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-04 08:56:51 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6e39b502511a0596bb3684f24f2d6fe99112ed9d
6e39b502
1 parent
6ec6f531
use a sized box instead of an error
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
14 deletions
lib/src/method_channel/mobile_scanner_method_channel.dart
lib/src/web/mobile_scanner_web.dart
lib/src/method_channel/mobile_scanner_method_channel.dart
View file @
6e39b50
...
...
@@ -179,13 +179,7 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
@override
Widget
buildCameraView
()
{
if
(
_textureId
==
null
)
{
throw
const
MobileScannerException
(
errorCode:
MobileScannerErrorCode
.
controllerUninitialized
,
errorDetails:
MobileScannerErrorDetails
(
message:
'The controller was not yet initialized. Call start() before calling buildCameraView().'
,
),
);
return
const
SizedBox
();
}
return
Texture
(
textureId:
_textureId
!);
...
...
lib/src/web/mobile_scanner_web.dart
View file @
6e39b50
...
...
@@ -69,13 +69,7 @@ class MobileScannerWeb extends MobileScannerPlatform {
@override
Widget
buildCameraView
()
{
if
(!
_barcodeReader
.
isScanning
)
{
throw
const
MobileScannerException
(
errorCode:
MobileScannerErrorCode
.
controllerUninitialized
,
errorDetails:
MobileScannerErrorDetails
(
message:
'The controller was not yet initialized. Call start() before calling buildCameraView().'
,
),
);
return
const
SizedBox
();
}
return
HtmlElementView
(
viewType:
_viewType
);
...
...
Please
register
or
login
to post a comment