isLocationInPreviewEnabled property

Future<bool> isLocationInPreviewEnabled

Checks if location in preview is enabled.

Returns a Future that completes with a boolean indicating whether location in preview is enabled.

Example usage:

bool locationInPreviewEnabled = await _barkoder.isLocationInPreviewEnabled;
print('Location in preview enabled: $locationInPreviewEnabled');

Implementation

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

  return await _methodChannel.invokeMethod('isLocationInPreviewEnabled');
}