Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Prev Previous commit
Next Next commit
Review comments
  • Loading branch information
stuartmorgan-g committed May 19, 2022
commit 014f1c05b5abcea678a548175c7f02989a8c9e96
3 changes: 2 additions & 1 deletion packages/camera/camera/lib/src/camera_image.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import 'package:camera_platform_interface/camera_platform_interface.dart';
import 'package:flutter/foundation.dart';

// TODO(stuartmorgan): Remove all of these classes in a breaking change, and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Is there an issue tracking this or is it coming in a follow up PR soon?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I filed flutter/flutter#104188

I'm not sure if we want to do a breaking change just for this or not. It's pretty minor... but on the other hand most clients wouldn't be affected, and it's a quick change for those who are, so it wouldn't be too disruptive to do.

// vend the platform interface versions directly.
// vend the platform interface versions directly. See
// https://github.com/flutter/flutter/issues/104188

/// A single color plane of image data.
///
Expand Down
14 changes: 7 additions & 7 deletions packages/camera/camera/test/camera_image_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ void main() {

final CameraImage image = CameraImage.fromPlatformInterface(originalImage);
// Simple values.
expect(image.width, originalImage.width);
expect(image.height, originalImage.height);
expect(image.lensAperture, originalImage.lensAperture);
expect(image.sensorExposureTime, originalImage.sensorExposureTime);
expect(image.sensorSensitivity, originalImage.sensorSensitivity);
expect(image.width, 640);
expect(image.height, 480);
expect(image.lensAperture, 2.5);
expect(image.sensorExposureTime, 5);
expect(image.sensorSensitivity, 1.3);
// Format.
expect(image.format.group, originalImage.format.group);
expect(image.format.raw, originalImage.format.raw);
expect(image.format.group, ImageFormatGroup.jpeg);
expect(image.format.raw, 1234);
// Planes.
expect(image.planes.length, originalImage.planes.length);
for (int i = 0; i < image.planes.length; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class CameraImagePlane {
/// The distance between adjacent pixel samples in bytes, when available.
final int? bytesPerPixel;

/// Height of the pixel buffer, when available
/// Height of the pixel buffer, when available.
final int? height;

/// Width of the pixel buffer, when available
/// Width of the pixel buffer, when available.
final int? width;
}

Expand Down