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
2022-05-31 11:18:57 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
94cc01e4edd9d938acfc1175f69d20749f480598
94cc01e4
1 parent
879bba55
bug: fix detect being null
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
example/android/gradle/wrapper/gradle-wrapper.properties
example/ios/Runner.xcodeproj/project.pbxproj
example/ios/Runner/Info.plist
lib/src/mobile_scanner.dart
example/android/gradle/wrapper/gradle-wrapper.properties
View file @
94cc01e
#Tue
Feb 15 22:11:04 CE
T 2022
#Tue
May 31 10:34:01 CES
T 2022
distributionBase
=
GRADLE_USER_HOME
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl
=
https
\:
//services.gradle.org/distributions/gradle-7.4
.2
-bin.zip
distributionPath
=
wrapper/dists
zipStorePath
=
wrapper/dists
zipStoreBase
=
GRADLE_USER_HOME
...
...
example/ios/Runner.xcodeproj/project.pbxproj
View file @
94cc01e
...
...
@@ -355,7 +355,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM =
3K8Q7WKS3W
;
DEVELOPMENT_TEAM =
75Y2P2WSQQ
;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
...
...
@@ -484,7 +484,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM =
3K8Q7WKS3W
;
DEVELOPMENT_TEAM =
75Y2P2WSQQ
;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
...
...
@@ -507,7 +507,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM =
3K8Q7WKS3W
;
DEVELOPMENT_TEAM =
75Y2P2WSQQ
;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
...
...
example/ios/Runner/Info.plist
View file @
94cc01e
...
...
@@ -47,5 +47,7 @@
</array>
<key>
UIViewControllerBasedStatusBarAppearance
</key>
<false/>
<key>
CADisableMinimumFrameDurationOnPhone
</key>
<true/>
</dict>
</plist>
...
...
lib/src/mobile_scanner.dart
View file @
94cc01e
...
...
@@ -13,7 +13,7 @@ class MobileScanner extends StatefulWidget {
///
/// [barcode] The barcode object with all information about the scanned code.
/// [args] Information about the state of the MobileScanner widget
final
Function
(
Barcode
barcode
,
MobileScannerArguments
?
args
)
?
onDetect
;
final
Function
(
Barcode
barcode
,
MobileScannerArguments
?
args
)
onDetect
;
/// TODO: Function that gets called when the Widget is initialized. Can be usefull
/// to check wether the device has a torch(flash) or not.
...
...
@@ -30,7 +30,7 @@ class MobileScanner extends StatefulWidget {
/// Create a [MobileScanner] with a [controller], the [controller] must has been initialized.
const
MobileScanner
({
Key
?
key
,
this
.
onDetect
,
required
this
.
onDetect
,
this
.
controller
,
this
.
fit
=
BoxFit
.
cover
,
this
.
allowDuplicates
=
false
,
...
...
@@ -82,10 +82,10 @@ class _MobileScannerState extends State<MobileScanner>
if
(!
widget
.
allowDuplicates
)
{
if
(
lastScanned
!=
barcode
.
rawValue
)
{
lastScanned
=
barcode
.
rawValue
;
widget
.
onDetect
!
(
barcode
,
value
!
as
MobileScannerArguments
);
widget
.
onDetect
(
barcode
,
value
!
as
MobileScannerArguments
);
}
}
else
{
widget
.
onDetect
!
(
barcode
,
value
!
as
MobileScannerArguments
);
widget
.
onDetect
(
barcode
,
value
!
as
MobileScannerArguments
);
}
});
return
ClipRect
(
...
...
Please
register
or
login
to post a comment