mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 23:10:40 +00:00
Compare commits
2 commits
50c2460f16
...
6e1aaf5acf
Author | SHA1 | Date | |
---|---|---|---|
|
6e1aaf5acf | ||
|
c12cfb1697 |
2 changed files with 7 additions and 2 deletions
|
@ -129,7 +129,6 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
|
|||
|
||||
await _cameraController!.initialize();
|
||||
await _cameraController!.setFlashMode(FlashMode.off);
|
||||
await _cameraController!.setFocusMode(FocusMode.locked);
|
||||
|
||||
_zoomRange = await Future.wait<double>([
|
||||
_cameraController!.getMinZoomLevel(),
|
||||
|
@ -206,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);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: lightmeter
|
||||
description: A new Flutter project.
|
||||
publish_to: "none"
|
||||
version: 0.12.3+34
|
||||
version: 0.12.4+35
|
||||
|
||||
environment:
|
||||
sdk: ">=3.0.0 <4.0.0"
|
||||
|
|
Loading…
Reference in a new issue