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
2023-11-08 14:44:18 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9dda3bac72f07337e5dc5fb4b2ca28865c927cf9
9dda3bac
1 parent
b9b8d7c2
add null check for texture id
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
lib/src/method_channel/mobile_scanner_method_channel.dart
lib/src/method_channel/mobile_scanner_method_channel.dart
View file @
9dda3ba
...
...
@@ -171,7 +171,18 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
}
@override
Widget
buildCameraView
()
=>
Texture
(
textureId:
_textureId
!);
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
Texture
(
textureId:
_textureId
!);
}
@override
Future
<
void
>
resetZoomScale
()
async
{
...
...
Please
register
or
login
to post a comment