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-08-03 10:01:15 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
19613dcd30d24382ae833da6c01fcadebb4201d2
19613dcd
1 parent
861f4c97
style: upgrade and apply lint
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
example/lib/barcode_scanner_controller.dart
example/pubspec.yaml
lib/src/mobile_scanner.dart
pubspec.yaml
example/lib/barcode_scanner_controller.dart
View file @
19613dc
...
...
@@ -133,9 +133,9 @@ class _BarcodeScannerWithControllerState
icon:
const
Icon
(
Icons
.
image
),
iconSize:
32.0
,
onPressed:
()
async
{
final
ImagePicker
_
picker
=
ImagePicker
();
final
ImagePicker
picker
=
ImagePicker
();
// Pick an image
final
XFile
?
image
=
await
_
picker
.
pickImage
(
final
XFile
?
image
=
await
picker
.
pickImage
(
source
:
ImageSource
.
gallery
,
);
if
(
image
!=
null
)
{
...
...
example/pubspec.yaml
View file @
19613dc
...
...
@@ -16,7 +16,7 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
lint
:
^1.
8.2
lint
:
^1.
10.0
flutter
:
uses-material-design
:
true
...
...
lib/src/mobile_scanner.dart
View file @
19613dc
...
...
@@ -29,12 +29,12 @@ class MobileScanner extends StatefulWidget {
/// Create a [MobileScanner] with a [controller], the [controller] must has been initialized.
const
MobileScanner
({
Key
?
key
,
super
.
key
,
required
this
.
onDetect
,
this
.
controller
,
this
.
fit
=
BoxFit
.
cover
,
this
.
allowDuplicates
=
false
,
})
:
super
(
key:
key
)
;
});
@override
State
<
MobileScanner
>
createState
()
=>
_MobileScannerState
();
...
...
@@ -75,7 +75,7 @@ class _MobileScannerState extends State<MobileScanner>
builder:
(
context
,
value
,
child
)
{
value
=
value
as
MobileScannerArguments
?;
if
(
value
==
null
)
{
return
Container
(
color:
Colors
.
black
);
return
const
ColoredBox
(
color:
Colors
.
black
);
}
else
{
controller
.
barcodes
.
listen
((
barcode
)
{
if
(!
widget
.
allowDuplicates
)
{
...
...
pubspec.yaml
View file @
19613dc
...
...
@@ -17,7 +17,7 @@ dependencies:
dev_dependencies
:
flutter_test
:
sdk
:
flutter
lint
:
^1.
8.2
lint
:
^1.
10.0
flutter
:
plugin
:
...
...
Please
register
or
login
to post a comment