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
Simon Brand
2022-04-17 01:53:32 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3103ff09b8db7f4fd810b81577c1a30805663d14
3103ff09
1 parent
bbf4d585
doc: barcode.rawValue can be null in the readme examples
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
README.md
README.md
View file @
3103ff0
...
...
@@ -71,8 +71,12 @@ import 'package:mobile_scanner/mobile_scanner.dart';
body:
MobileScanner
(
allowDuplicates:
false
,
onDetect:
(
barcode
,
args
)
{
final
String
code
=
barcode
.
rawValue
;
if
(
barcode
.
rawValue
==
null
)
{
debugPrint
(
'Failed to scan Barcode'
);
}
else
{
final
String
code
=
barcode
.
rawValue
!;
debugPrint
(
'Barcode found!
$code
'
);
}
}),
);
}
...
...
@@ -92,8 +96,12 @@ import 'package:mobile_scanner/mobile_scanner.dart';
controller:
MobileScannerController
(
facing:
CameraFacing
.
front
,
torchEnabled:
true
),
onDetect:
(
barcode
,
args
)
{
final
String
code
=
barcode
.
rawValue
;
if
(
barcode
.
rawValue
==
null
)
{
debugPrint
(
'Failed to scan Barcode'
);
}
else
{
final
String
code
=
barcode
.
rawValue
!;
debugPrint
(
'Barcode found!
$code
'
);
}
}),
);
}
...
...
@@ -150,8 +158,12 @@ import 'package:mobile_scanner/mobile_scanner.dart';
allowDuplicates:
false
,
controller:
cameraController
,
onDetect:
(
barcode
,
args
)
{
final
String
code
=
barcode
.
rawValue
;
if
(
barcode
.
rawValue
==
null
)
{
debugPrint
(
'Failed to scan Barcode'
);
}
else
{
final
String
code
=
barcode
.
rawValue
!;
debugPrint
(
'Barcode found!
$code
'
);
}
}));
}
```
...
...
Please
register
or
login
to post a comment