Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
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.
  • Loading branch information
Adam Harwood committed Nov 21, 2022
commit 826145bb21590dc23a457b5b5f9c8e646714ad57
4 changes: 4 additions & 0 deletions packages/camera/camera_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.3.1

* Exports VideoCaptureOptions to allow dependencies to implement concurrent stream and record.

## 2.3.0

* Adds new capture method for a camera to allow concurrent streaming and recording.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import '../../camera_platform_interface.dart';
import '../method_channel/method_channel_camera.dart';
import '../types/video_capture_options.dart';

/// The interface that implementations of camera must implement.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export 'flash_mode.dart';
export 'focus_mode.dart';
export 'image_format_group.dart';
export 'resolution_preset.dart';
export 'video_capture_options.dart';
2 changes: 1 addition & 1 deletion packages/camera/camera_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera_
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
version: 2.3.0
version: 2.3.1

environment:
sdk: '>=2.12.0 <3.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,48 @@ void main() {
);
});
});

group('exports', () {
test('CameraDescription is exported', () {
const CameraDescription(
name: 'abc-123',
sensorOrientation: 1,
lensDirection: CameraLensDirection.external);
});

test('CameraException is exported', () {
CameraException('1', 'error');
});

test('CameraImageData is exported', () {
const CameraImageData(
width: 1,
height: 1,
format: CameraImageFormat(ImageFormatGroup.bgra8888, raw: 1),
planes: [],
);
});

test('ExposureMode is exported', () {
ExposureMode.auto;
});

test('FlashMode is exported', () {
FlashMode.auto;
});

test('FocusMode is exported', () {
FocusMode.auto;
});

test('ResolutionPreset is exported', () {
ResolutionPreset.high;
});

test('VideoCaptureOptions is exported', () {
const VideoCaptureOptions(123);
});
});
}

class ImplementsCameraPlatform implements CameraPlatform {
Expand Down