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
Navaron Bracke
2023-10-23 12:06:44 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
40a66bb1e105fd5cabaa64eab76bff2cbfc7b108
40a66bb1
1 parent
10383105
rewrite some comments to avoid `NOTE` in capitals
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
lib/src/enums/detection_speed.dart
lib/src/mobile_scanner_controller.dart
lib/src/enums/detection_speed.dart
View file @
40a66bb
...
...
@@ -3,19 +3,17 @@ enum DetectionSpeed {
/// The scanner will only scan a barcode once, and never again until another
/// barcode has been scanned.
///
/// NOTE: This mode does analyze every frame in order to check if the value
/// has changed.
/// Bear in mind that this mode analyzes every frame,
/// in order to check if the value has changed.
noDuplicates
(
0
),
/// The barcode scanner will scan one barcode, and wait 250 Miliseconds before
/// scanning again. This will prevent memory issues on older devices.
///
/// You can change the timeout duration with [detectionTimeout] parameter.
/// The barcode scanner will scan barcodes,
/// while respecting the configured scan timeout between individual scans.
normal
(
1
),
///
Let the scanner detect barcodes without restriction
.
///
The barcode scanner will scan barcodes, without any restrictions
.
///
///
NOTE: This can cause memory issues with
older devices.
///
Bear in mind that this mode can cause memory issues on
older devices.
unrestricted
(
2
);
const
DetectionSpeed
(
this
.
rawValue
);
...
...
lib/src/mobile_scanner_controller.dart
View file @
40a66bb
...
...
@@ -49,11 +49,13 @@ class MobileScannerController {
/// WARNING: DetectionSpeed.unrestricted can cause memory issues on some devices
final
DetectionSpeed
detectionSpeed
;
/// Sets the timeout of scanner.
/// The timeout is set in miliseconds.
/// Sets the timeout, in milliseconds, of the scanner.
///
/// NOTE: The timeout only works if the [detectionSpeed] is set to
/// [DetectionSpeed.normal] (which is the default value).
/// This timeout is ignored if the [detectionSpeed]
/// is not set to [DetectionSpeed.normal].
///
/// By default this is set to `250` milliseconds,
/// which prevents memory issues on older devices.
final
int
detectionTimeoutMs
;
/// Automatically start the mobileScanner on initialization.
...
...
Please
register
or
login
to post a comment