setDuplicatesDelayMs method

Future<void> setDuplicatesDelayMs(
  1. int duplicatesDelayMs
)

Sets the delay in milliseconds for considering duplicate barcodes during scanning.

duplicatesDelayMs: The delay in milliseconds for detecting duplicate scans.

Example usage:

int delayMs = 500; // 500 milliseconds
_barkoder.setDuplicatesDelayMs(delayMs);
print('Duplicates detection delay set to: $delayMs milliseconds');

Implementation

Future<void> setDuplicatesDelayMs(int duplicatesDelayMs) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod(
      'setDuplicatesDelayMs', duplicatesDelayMs);
}