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
Peng Zhou
2024-04-23 13:02:21 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
408aaab895ae841b4cad11b6dac9e4a97bcc1817
408aaab8
1 parent
8c87026a
change platform os detect pattern
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
lib/src/method_channel/mobile_scanner_method_channel.dart
lib/src/method_channel/mobile_scanner_method_channel.dart
View file @
408aaab
import
'dart:async'
;
import
'dart:io'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:mobile_scanner/src/enums/barcode_format.dart'
;
...
...
@@ -54,7 +54,7 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
final
List
<
Map
<
Object
?,
Object
?>>
barcodes
=
data
.
cast
<
Map
<
Object
?,
Object
?>>();
if
(
Platform
.
isM
acOS
)
{
if
(
defaultTargetPlatform
==
TargetPlatform
.
m
acOS
)
{
return
BarcodeCapture
(
raw:
event
,
barcodes:
barcodes
...
...
@@ -70,7 +70,8 @@ class MethodChannelMobileScanner extends MobileScannerPlatform {
);
}
if
(
Platform
.
isAndroid
||
Platform
.
isIOS
)
{
if
(
defaultTargetPlatform
==
TargetPlatform
.
android
||
defaultTargetPlatform
==
TargetPlatform
.
iOS
)
{
final
double
?
width
=
event
[
'width'
]
as
double
?;
final
double
?
height
=
event
[
'height'
]
as
double
?;
...
...
Please
register
or
login
to post a comment