setEnableVINRestrictions method

Future<void> setEnableVINRestrictions(
  1. bool enabled
)

Sets whether Vehicle Identification Number (VIN) restrictions are enabled.

enabled: A boolean indicating whether to enable or disable VIN restrictions.

Example usage:

bool isEnabled = true;
_barkoder.setEnableVINRestrictions(isEnabled);
print('VIN restrictions enabled set to: $isEnabled');

Implementation

Future<void> setEnableVINRestrictions(bool enabled) {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return _methodChannel.invokeMethod('setEnableVINRestrictions', enabled);
}