getBarkoderResolution property

Future<BarkoderResolution> getBarkoderResolution

Retrieves the resolution for barcode scanning.

Returns a Future that completes with a BarkoderResolution enum value.

Example usage:

BarkoderResolution resolution = await _barkoder.getBarkoderResolution;
print('Barkoder resolution: $resolution');

Implementation

Future<BarkoderResolution> get getBarkoderResolution async {
  if (_isBarkoderViewNotMounted) {
    return Future.error(PlatformException(
        code: BarkoderErrors.barkoderViewNotMounted,
        message: BarkoderErrors.barkodeViewNotMountedDesc));
  }

  return await _methodChannel
      .invokeMethod('getBarkoderResolution')
      .then((index) {
    return BarkoderResolution.values[index];
  });
}