outputSize method

  1. @override
Future<Size> outputSize()
override

The size in pixels retrieved by the output.

This should be called after setting AND awaiting CameraController.setControllerPreset. Otherwise, this value could return null. A null value indicates the output is using the default size.

Implementation

@override
Future<Size> outputSize() async {
  verifyAttached();
  final CameraSize size = await _controller.cameraParameters.getPictureSize();
  return Size(size.width.toDouble(), size.height.toDouble());
}