Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/camera/camera_avfoundation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.11.0+4

* Fixes a Swift 6 Sendability mismatch in the `CaptureDevice` protocol's `setExposureTargetBias` completion handler.

## 0.11.0+3

* Fixes a crash when switching camera while recording video due to disconnected photo output.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MockCaptureDevice: NSObject, CaptureDevice {
var setFocusPointOfInterestStub: ((CGPoint) -> Void)?
var setExposureModeStub: ((AVCaptureDevice.ExposureMode) -> Void)?
var setExposurePointOfInterestStub: ((CGPoint) -> Void)?
var setExposureTargetBiasStub: ((Float, ((CMTime) -> Void)?) -> Void)?
var setExposureTargetBiasStub: ((Float, (@Sendable (CMTime) -> Void)?) -> Void)?
var isExposureModeSupportedStub: ((AVCaptureDevice.ExposureMode) -> Bool)?
var setVideoZoomFactorStub: ((CGFloat) -> Void)?
var lockForConfigurationStub: (() throws -> Void)?
Expand Down Expand Up @@ -99,7 +99,9 @@ class MockCaptureDevice: NSObject, CaptureDevice {
set { setExposurePointOfInterestStub?(newValue) }
}

func setExposureTargetBias(_ bias: Float, completionHandler handler: ((CMTime) -> Void)? = nil) {
func setExposureTargetBias(
_ bias: Float, completionHandler handler: (@Sendable (CMTime) -> Void)? = nil
) {
setExposureTargetBiasStub?(bias, handler)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protocol CaptureDevice: NSObjectProtocol {
var minExposureTargetBias: Float { get }
var maxExposureTargetBias: Float { get }
func setExposureTargetBias(
_ bias: Float, completionHandler handler: ((CMTime) -> Void)?)
_ bias: Float, completionHandler handler: (@Sendable (CMTime) -> Void)?)
func isExposureModeSupported(_ mode: AVCaptureDevice.ExposureMode) -> Bool

// Zoom
Expand Down
2 changes: 1 addition & 1 deletion packages/camera/camera_avfoundation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: camera_avfoundation
description: iOS implementation of the camera plugin.
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_avfoundation
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
version: 0.11.0+3
version: 0.11.0+4

environment:
sdk: ^3.11.0
Expand Down
Loading