KeyboardWedgeSource constructor
KeyboardWedgeSource({
- WedgeConfig config = const WedgeConfig(),
- bool ignoreWhenEditing = true,
- bool useEventTimestamps = true,
- ScanSymbology symbology = ScanSymbology.unknown,
- Duration clock()?,
- DateTime wallClock()?,
Creates a source. Call start (or use KeyboardWedgeListener).
clock returns monotonic time; by default a Stopwatch. With
useEventTimestamps, the key events' own timestamps are used when the
platform provides them, so a busy UI thread does not split a scan.
Implementation
KeyboardWedgeSource({
WedgeConfig config = const WedgeConfig(),
this.ignoreWhenEditing = true,
this.useEventTimestamps = true,
this.symbology = ScanSymbology.unknown,
Duration Function()? clock,
DateTime Function()? wallClock,
}) : _assembler = WedgeAssembler(config),
_clock = clock ?? _stopwatchClock(),
_wallClock = wallClock ?? DateTime.now;