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

Commit 18bb963

Browse files
author
David Roume
committed
unlock resolution
1 parent f25e370 commit 18bb963

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

packages/camera/camera/android/src/main/java/io/flutter/plugins/camera/features/resolution/ResolutionFeature.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ public void updateBuilder(CaptureRequest.Builder requestBuilder) {
111111
@VisibleForTesting
112112
static Size computeBestPreviewSize(int cameraId, ResolutionPreset preset)
113113
throws IndexOutOfBoundsException {
114-
if (preset.ordinal() > ResolutionPreset.high.ordinal()) {
115-
preset = ResolutionPreset.high;
116-
}
114+
// if (preset.ordinal() > ResolutionPreset.high.ordinal()) {
115+
// preset = ResolutionPreset.high;
116+
// }
117117
if (Build.VERSION.SDK_INT >= 31) {
118118
EncoderProfiles profile =
119119
getBestAvailableCamcorderProfileForResolutionPreset(cameraId, preset);

packages/camera/camera/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: A Flutter plugin for controlling the camera. Supports previewing
44
Dart.
55
repository: https://github.com/flutter/plugins/tree/main/packages/camera/camera
66
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22
7-
version: 0.9.4+16
7+
version: 0.9.5
88

99
environment:
1010
sdk: ">=2.14.0 <3.0.0"

packages/camera/camera_platform_interface/lib/src/method_channel/method_channel_camera.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,8 @@ class MethodChannelCamera extends CameraPlatform {
429429

430430
@override
431431
Widget buildPreview(int cameraId) {
432-
return Texture(textureId: cameraId);
432+
//return Texture(textureId: cameraId);
433+
return Texture(textureId: controller.cameraId, filterQuality: FilterQuality.none);
433434
}
434435

435436
/// Returns the flash mode as a String.

0 commit comments

Comments
 (0)