File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
packages/camera/camera_avfoundation/example/ios/RunnerTests/Mocks Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 3
3
// found in the LICENSE file.
4
4
5
5
/// A mock implementation of `FLTCaptureConnection` that allows injecting a custom implementation.
6
- class MockCaptureConnection : NSObject , FLTCaptureConnection {
6
+ final class MockCaptureConnection : NSObject , FLTCaptureConnection {
7
7
var setVideoOrientationStub : ( ( AVCaptureVideoOrientation ) -> Void ) ?
8
8
9
9
var connection : AVCaptureConnection {
10
10
preconditionFailure ( " Attempted to access unimplemented property: connection " )
11
11
}
12
12
var isVideoMirrored = false
13
- var _videoOrientation = AVCaptureVideoOrientation . portrait
14
13
var videoOrientation : AVCaptureVideoOrientation {
15
- get {
16
- return _videoOrientation
17
- }
14
+ get { AVCaptureVideoOrientation . portrait }
18
15
set {
19
- if let stub = setVideoOrientationStub {
20
- stub ( newValue)
21
- } else {
22
- _videoOrientation = newValue
23
- }
16
+ setVideoOrientationStub ? ( newValue)
24
17
}
25
18
}
26
19
var inputPorts : [ AVCaptureInput . Port ] = [ ]
You can’t perform that action at this time.
0 commit comments