withCameraSync<T> static method
Safely execute camera operations (synchronous version)
Implementation
static T? withCameraSync<T>(
CameraPosition position,
CameraOwner owner,
T Function(Camera camera) operation,
) {
final camera = getCamera(position, owner);
if (camera == null) {
return null;
}
try {
final result = operation(camera);
return result;
} catch (error) {
SdkLogger.info('CameraOwnershipHelper', 'withCameraSync', 'Camera operation failed for ${owner.id}: $error');
rethrow;
}
}