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
Julian Steenbakker
2023-03-29 22:31:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fbe9483ad3b5b590432f1f53e1d8583a8df93bb3
fbe9483a
1 parent
05d6805a
bug: fixed onDetect not working with analyzeImage
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
lib/src/mobile_scanner_controller.dart
lib/src/mobile_scanner_controller.dart
View file @
fbe9483
...
...
@@ -150,13 +150,12 @@ class MobileScannerController {
return
null
;
}
isStarting
=
true
;
events
?.
cancel
();
events
=
_eventChannel
events
??=
_eventChannel
.
receiveBroadcastStream
()
.
listen
((
data
)
=>
_handleEvent
(
data
as
Map
));
isStarting
=
true
;
// Check authorization status
if
(!
kIsWeb
)
{
final
MobileScannerState
state
=
MobileScannerState
...
...
@@ -294,6 +293,10 @@ class MobileScannerController {
///
/// [path] The path of the image on the devices
Future
<
bool
>
analyzeImage
(
String
path
)
async
{
events
??=
_eventChannel
.
receiveBroadcastStream
()
.
listen
((
data
)
=>
_handleEvent
(
data
as
Map
));
return
_methodChannel
.
invokeMethod
<
bool
>(
'analyzeImage'
,
path
)
.
then
<
bool
>((
bool
?
value
)
=>
value
??
false
);
...
...
Please
register
or
login
to post a comment