updateScreenshotBlocking method

Future<void> updateScreenshotBlocking(
  1. bool enabled
)

Update screenshot blocking configuration

Implementation

Future<void> updateScreenshotBlocking(bool enabled) async {
  try {
    if (!enabled) {
      await _enableScreenshotBlocking();
    } else {
      await _disableScreenshotBlocking();
    }

    // Update configuration
    if (_config != null) {
      _config = _config!.copyWith(enableScreenshotBlocking: enabled);
    }

    _logSecurityEvent(
      'Screenshot blocking ${enabled ? 'enabled' : 'disabled'}',
      LogLevel.info,
    );
  } catch (e) {
    _logSecurityEvent(
      'Screenshot blocking update failed: $e',
      LogLevel.error,
    );
    rethrow;
  }
}