This commit is contained in:
Vadim 2023-08-04 13:17:55 +02:00
commit 2712df4856
2 changed files with 8 additions and 2 deletions

View file

@ -205,7 +205,13 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
Future<double?> _takePhoto() async {
try {
// https://github.com/flutter/flutter/issues/84957#issuecomment-1661155095
await _cameraController!.setFocusMode(FocusMode.locked);
await _cameraController!.setExposureMode(ExposureMode.locked);
final file = await _cameraController!.takePicture();
await _cameraController!.setFocusMode(FocusMode.auto);
await _cameraController!.setExposureMode(ExposureMode.auto);
final Uint8List bytes = await file.readAsBytes();
Directory(file.path).deleteSync(recursive: true);

View file

@ -1,7 +1,7 @@
name: lightmeter
description: A new Flutter project.
publish_to: "none"
version: 0.12.2+33
version: 0.12.4+35
environment:
sdk: ">=3.0.0 <4.0.0"
@ -9,7 +9,7 @@ environment:
dependencies:
app_settings: 4.2.0
bloc_concurrency: 0.2.2
camera: 0.10.5
camera: 0.10.5+2
clipboard: 0.1.3
dynamic_color: 1.6.5
exif: 3.1.4