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:27:37 +0200
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
cfb5dbe76ecf3312b9ef539647b6fd1677cf261b
cfb5dbe7
2 parents
22961faf
6f01742f
Merge branch 'master' into master-play-services
# Conflicts: # CHANGELOG.md # pubspec.yaml
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
15 deletions
CHANGELOG.md
android/build.gradle
example/android/build.gradle
example/android/gradle/wrapper/gradle-wrapper.properties
example/ios/Runner.xcodeproj/project.pbxproj
example/ios/Runner/Info.plist
lib/src/mobile_scanner.dart
pubspec.yaml
CHANGELOG.md
View file @
cfb5dbe
## 1.1.2
This version is the last version that will run on Flutter 2.x
Bugfixes:
*
Changed onDetect to be mandatory.
## 1.1.1-play-services
This version uses the MLKit play-services model on Android in order to save space.
With the example app, this version reduces the release version from 14.9MB to 7MB.
...
...
android/build.gradle
View file @
cfb5dbe
...
...
@@ -9,7 +9,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.2.
0
'
classpath
'com.android.tools.build:gradle:7.2.
1
'
}
}
...
...
@@ -24,7 +24,7 @@ apply plugin: 'com.android.library'
apply
plugin:
'kotlin-android'
android
{
compileSdkVersion
3
1
compileSdkVersion
3
2
compileOptions
{
sourceCompatibility
JavaVersion
.
VERSION_1_8
...
...
example/android/build.gradle
View file @
cfb5dbe
...
...
@@ -6,7 +6,7 @@ buildscript {
}
dependencies
{
classpath
'com.android.tools.build:gradle:7.2.
0
'
classpath
'com.android.tools.build:gradle:7.2.
1
'
classpath
"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
...
example/android/gradle/wrapper/gradle-wrapper.properties
View file @
cfb5dbe
#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 @
cfb5dbe
...
...
@@ -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 @
cfb5dbe
...
...
@@ -47,5 +47,7 @@
</array>
<key>
UIViewControllerBasedStatusBarAppearance
</key>
<false/>
<key>
CADisableMinimumFrameDurationOnPhone
</key>
<true/>
</dict>
</plist>
...
...
lib/src/mobile_scanner.dart
View file @
cfb5dbe
...
...
@@ -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
,
...
...
@@ -47,7 +47,7 @@ class _MobileScannerState extends State<MobileScanner>
@override
void
initState
()
{
super
.
initState
();
WidgetsBinding
.
instance
.
addObserver
(
this
);
WidgetsBinding
.
instance
?
.
addObserver
(
this
);
controller
=
widget
.
controller
??
MobileScannerController
();
}
...
...
@@ -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
(
...
...
@@ -131,7 +131,7 @@ class _MobileScannerState extends State<MobileScanner>
@override
void
dispose
()
{
controller
.
dispose
();
WidgetsBinding
.
instance
.
removeObserver
(
this
);
WidgetsBinding
.
instance
?
.
removeObserver
(
this
);
super
.
dispose
();
}
}
...
...
pubspec.yaml
View file @
cfb5dbe
name
:
mobile_scanner
description
:
A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
version
:
1.1.
1-play-services
version
:
1.1.
2
repository
:
https://github.com/juliansteenbakker/mobile_scanner
environment
:
...
...
Please
register
or
login
to post a comment