Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 826145b

Browse files
author
Adam Harwood
committed
Export VideoCaptureOptions so that it is accessible to other packages
Also added tests so that missing exports can be more easily tested in the future.
1 parent 283122b commit 826145b

File tree

5 files changed

+48
-2
lines changed

5 files changed

+48
-2
lines changed

packages/camera/camera_platform_interface/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 2.3.1
2+
3+
* Exports VideoCaptureOptions to allow dependencies to implement concurrent stream and record.
4+
15
## 2.3.0
26

37
* Adds new capture method for a camera to allow concurrent streaming and recording.

packages/camera/camera_platform_interface/lib/src/platform_interface/camera_platform.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';
1111

1212
import '../../camera_platform_interface.dart';
1313
import '../method_channel/method_channel_camera.dart';
14-
import '../types/video_capture_options.dart';
1514

1615
/// The interface that implementations of camera must implement.
1716
///

packages/camera/camera_platform_interface/lib/src/types/types.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ export 'flash_mode.dart';
1010
export 'focus_mode.dart';
1111
export 'image_format_group.dart';
1212
export 'resolution_preset.dart';
13+
export 'video_capture_options.dart';

packages/camera/camera_platform_interface/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_
44
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
55
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
66
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
7-
version: 2.3.0
7+
version: 2.3.1
88

99
environment:
1010
sdk: '>=2.12.0 <3.0.0'

packages/camera/camera_platform_interface/test/camera_platform_interface_test.dart

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,48 @@ void main() {
442442
);
443443
});
444444
});
445+
446+
group('exports', () {
447+
test('CameraDescription is exported', () {
448+
const CameraDescription(
449+
name: 'abc-123',
450+
sensorOrientation: 1,
451+
lensDirection: CameraLensDirection.external);
452+
});
453+
454+
test('CameraException is exported', () {
455+
CameraException('1', 'error');
456+
});
457+
458+
test('CameraImageData is exported', () {
459+
const CameraImageData(
460+
width: 1,
461+
height: 1,
462+
format: CameraImageFormat(ImageFormatGroup.bgra8888, raw: 1),
463+
planes: [],
464+
);
465+
});
466+
467+
test('ExposureMode is exported', () {
468+
ExposureMode.auto;
469+
});
470+
471+
test('FlashMode is exported', () {
472+
FlashMode.auto;
473+
});
474+
475+
test('FocusMode is exported', () {
476+
FocusMode.auto;
477+
});
478+
479+
test('ResolutionPreset is exported', () {
480+
ResolutionPreset.high;
481+
});
482+
483+
test('VideoCaptureOptions is exported', () {
484+
const VideoCaptureOptions(123);
485+
});
486+
});
445487
}
446488

447489
class ImplementsCameraPlatform implements CameraPlatform {

0 commit comments

Comments
 (0)