scan_tally_flutter library
The Flutter layer of scan_tally: everything in scan_tally.dart plus
KeyboardWedgeSource, KeyboardWedgeListener, FlutterScanFeedbackPlayer,
ScanFlash and ScanSessionBuilder.
Classes
- CheckDigit
- GS1 check digit helpers for EAN-13, EAN-8, UPC-A, UPC-E, GTIN-14 and SSCC.
- DedupePolicy
- How repeated reads of the same code are turned into counts.
- FlutterScanFeedbackPlayer
- The standard ScanFeedbackPlayer for Flutter apps: sound and haptics.
- FlutterScanHaptics
- ScanHaptics built on Flutter's HapticFeedback: no plugin and no permission needed.
- FrameConfirmation
- Requires a code to be read in frames consecutive camera frames before it counts, to filter misreads from blurry images.
- Gs1AiDefinition
- The definition of a GS1 application identifier (AI).
- Gs1Data
- The GS1 element strings of one barcode.
- Gs1Date
- A GS1 date (YYMMDD) with the "day 00" rule applied.
- Gs1Element
- One element string: an application identifier and its value.
- Gs1Parser
- Parses GS1-128, GS1 DataMatrix, GS1 QR and GS1 DataBar data.
- HapticPattern
- A sequence of haptic pulses with pauses between them.
- KeyboardWedgeListener
- Listens to a keyboard wedge scanner while this widget is mounted.
- KeyboardWedgeSource
- A ScanSource for keyboard wedge scanners (Zebra DataWedge keystroke output, Honeywell keyboard wedge, USB/Bluetooth HID scanners).
- ScanAccepted
- The code counted.
- ScanCode
- A scanned code, as passed to the validator and carried by events.
- ScanDeduplicator
-
The duplicate filter used by
ScanSession, as a small synchronous state machine. - ScanDuplicate
- The code was scanned again within the cooldown and did not count.
- ScanEntry
- The count of one key in a ScanSession.
- ScanEntryChange
- One entry changed by a ScanOperation.
- ScanEvent
- Something that happened to a scanned code.
- ScanFeedback
- Which feedback channels are on.
- ScanFeedbackPlayer
- Plays sound and vibration for scan results.
- ScanFlash
- Flashes a color over child for each scan event of session: green for accepted, amber for duplicate, red for rejected.
- ScanFlashColors
- Colors of ScanFlash.
- ScanFrame
- The codes a source saw at one moment: one camera frame, or one hardware trigger.
- ScanHaptics
- Vibrates for a feedback kind. Implement it to use a vibration plugin (e.g. for stronger, longer patterns felt through gloves).
- ScanOperation
- A change to the counts, kept so it can be undone.
- ScanRead
- One barcode value seen in a ScanFrame.
- ScanRejected
- The code did not count because it is invalid.
- ScanSession
- A counting session: turns scans from any ScanSource into per-code counts.
- ScanSessionBuilder
- Rebuilds whenever session changes (counts, undo, feedback settings).
- ScanSoundPlayer
-
Plays the sound of a feedback kind. Implement it with the audio plugin of
your choice; see the package README for an
audioplayersversion that plays the bundled WAV files (ScanTones.assetKeyOf). - ScanSource
- Anything that produces scans: a camera plugin adapter, a keyboard wedge listener, a test.
- ScanSourceController
- A ScanSource fed by hand, e.g. from a plugin callback or in tests.
- ScanTones
- The built-in feedback tones and a tiny WAV synthesizer.
- ScanVerdict
- The app's answer to a scanned code.
- SystemScanSoundPlayer
- A dependency-free ScanSoundPlayer that uses the platform's system sounds (SystemSound).
- ToneSegment
- A part of a feedback tone: a sine wave of frequency Hz, or silence when frequency is 0.
- WedgeAssembler
- Joins fast key presses into barcode values.
- WedgeConfig
- Settings of a keyboard wedge scanner, i.e. a hardware scanner that "types" the barcode as key presses (Zebra DataWedge keystroke output, Honeywell keyboard wedge, USB/Bluetooth HID scanners).
- WedgeStep
- What a key did in the WedgeAssembler.
Enums
- CheckDigitPolicy
- When ScanSession checks GTIN check digits.
- DedupeDecision
- The result of ScanDeduplicator.check.
- Gs1ValueFormat
- How the value of an application identifier is formatted.
- HapticImpact
- One haptic pulse.
- ScanFeedbackKind
- The three kinds of scan feedback.
- ScanOperationKind
- Kinds of changes that ScanSession.undoLast can revert.
- ScanOrigin
- Where a read came from.
- ScanRejectReason
- Why a code was rejected.
- ScanSymbology
- The barcode type of a read, as far as the source knows it.
- WedgeDiscardReason
- Why a burst of keys was dropped.
- WedgeTerminator
- Keys that can end a scan of a keyboard wedge scanner.
Functions
-
wedgeKeyEventsFor(
String code, {Duration start = Duration.zero, Duration interval = const Duration(milliseconds: 5)}) → List< KeyEvent> -
The key events a wedge scanner sends for
code: one key down/up pair per character,intervalapart, then Enter. Feed them to KeyboardWedgeSource.handleKeyEvent to simulate a scanner in demos and tests.
Typedefs
-
ScanValidator
= FutureOr<
ScanVerdict> Function(ScanCode code) - Decides whether a scanned code counts. May be asynchronous (a database lookup).