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-08 11:13:18 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
260b4522e732f5810eea11c8e7e9a898f10a036b
260b4522
1 parent
2d01818c
imp: reinstated onStart but made it deprecated so it doesn't break immediately.
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
lib/src/mobile_scanner.dart
lib/src/mobile_scanner.dart
View file @
260b452
...
...
@@ -22,6 +22,10 @@ class MobileScanner extends StatefulWidget {
final
void
Function
(
BarcodeCapture
barcodes
)
onDetect
;
/// The function that signals when the barcode scanner is started.
@Deprecated
(
'Use onScannerStarted() instead.'
)
final
void
Function
(
MobileScannerArguments
?
arguments
)?
onStart
;
/// The function that signals when the barcode scanner is started.
final
void
Function
(
MobileScannerArguments
?
arguments
)?
onScannerStarted
;
/// The function that builds a placeholder widget when the scanner
...
...
@@ -36,6 +40,7 @@ class MobileScanner extends StatefulWidget {
this
.
controller
,
this
.
fit
=
BoxFit
.
cover
,
required
this
.
onDetect
,
@Deprecated
(
'Use onScannerStarted() instead.'
)
this
.
onStart
,
this
.
onScannerStarted
,
this
.
placeholderBuilder
,
super
.
key
,
...
...
@@ -60,6 +65,8 @@ class _MobileScannerState extends State<MobileScanner>
/// Start the given [scanner].
void
_startScanner
(
MobileScannerController
scanner
)
{
scanner
.
start
().
then
((
arguments
)
{
// ignore: deprecated_member_use_from_same_package
widget
.
onStart
?.
call
(
arguments
);
widget
.
onScannerStarted
?.
call
(
arguments
);
});
}
...
...
Please
register
or
login
to post a comment