isCloseSessionOnResultEnabled property

Future<bool> isCloseSessionOnResultEnabled

Checks if the session is closed on result enabled.

Returns a Future that completes with a boolean indicating whether the session is closed on result enabled.

Example usage:

bool closeSessionEnabled = await _barkoder.isCloseSessionOnResultEnabled;
print('Close session on result enabled: $closeSessionEnabled');

Implementation

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

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