setMaximumResultsCount method

Future<void> setMaximumResultsCount(
  1. int maximumResultsCount
)

Sets the maximum number of results to be returned from barcode scanning.

maximumResultsCount: The maximum number of results to be returned.

Example usage:

int maxResults = 10;
await _barkoder.setMaximumResultsCount(maxResults);
print('Maximum results count set to: $maxResults');

Implementation

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

  return _methodChannel.invokeMethod(
      'setMaximumResultsCount', maximumResultsCount);
}