setBarkoderResolution method
- BarkoderResolution resolution
Sets the resolution for barcode scanning.
resolution
: The BarkoderResolution enum value to set.
Example usage:
BarkoderResolution resolution = BarkoderResolution.HIGH;
await _barkoder.setBarkoderResolution(resolution);
print('Barkoder resolution set to: $resolution');
Implementation
Future<void> setBarkoderResolution(BarkoderResolution resolution) {
if (_isBarkoderViewNotMounted) {
return Future.error(PlatformException(
code: BarkoderErrors.barkoderViewNotMounted,
message: BarkoderErrors.barkodeViewNotMountedDesc));
}
return _methodChannel.invokeMethod(
'setBarkoderResolution', resolution.index);
}