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-12-12 21:51:15 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
716d2337c8959a3aa37f93bedf0c4e0b7162ef7f
716d2337
1 parent
efea6764
imp: change parameters
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
CHANGELOG.md
example/lib/barcode_scanner_window.dart
macos/mobile_scanner.podspec
CHANGELOG.md
View file @
716d233
...
...
@@ -19,6 +19,8 @@ Improvements:
*
Removed
`called stop while already stopped`
messages.
Features:
*
You can now provide a
`scanWindow` to the `MobileScanner()`
widget.
*
You can now draw an overlay over the scanned barcode. See the barcode scanner window in the example app for more information.
*
Added a new
`placeholderBuilder` function to the `MobileScanner`
widget to customize the preview placeholder.
*
Added
`autoStart`
parameter to MobileScannerController(). If set to false, controller won't start automatically.
*
Added
`hasTorch`
function on MobileScannerController(). After starting the controller, you can check if the device has a torch.
...
...
example/lib/barcode_scanner_window.dart
View file @
716d233
...
...
@@ -54,11 +54,10 @@ class _BarcodeScannerWithScanWindowState
arguments
!=
null
)
CustomPaint
(
painter:
BarcodeOverlay
(
barcode
!,
arguments
!,
BoxFit
.
contain
,
MediaQuery
.
of
(
context
).
devicePixelRatio
,
capture
!,
barcode:
barcode
!,
arguments:
arguments
!,
boxFit:
BoxFit
.
contain
,
capture:
capture
!,
),
),
CustomPaint
(
...
...
@@ -131,19 +130,17 @@ class ScannerOverlay extends CustomPainter {
}
class
BarcodeOverlay
extends
CustomPainter
{
BarcodeOverlay
(
this
.
barcode
,
this
.
arguments
,
this
.
boxFit
,
this
.
devicePixelRatio
,
this
.
capture
,
);
BarcodeOverlay
({
required
this
.
barcode
,
required
this
.
arguments
,
required
this
.
boxFit
,
required
this
.
capture
,
});
final
BarcodeCapture
capture
;
final
Barcode
barcode
;
final
MobileScannerArguments
arguments
;
final
BoxFit
boxFit
;
final
double
devicePixelRatio
;
@override
void
paint
(
Canvas
canvas
,
Size
size
)
{
...
...
macos/mobile_scanner.podspec
View file @
716d233
...
...
@@ -4,7 +4,7 @@
#
Pod
::
Spec
.
new
do
|
s
|
s
.
name
=
'mobile_scanner'
s
.
version
=
'
0.0.1
'
s
.
version
=
'
3.0.0
'
s
.
summary
=
'An universal scanner for Flutter based on MLKit.'
s
.
description
=
<<-
DESC
An universal scanner for Flutter based on MLKit.
...
...
Please
register
or
login
to post a comment