mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 00:10:47 +00:00
omit camera measure on startup
This commit is contained in:
parent
c88a767d1a
commit
c777bdb68e
1 changed files with 2 additions and 7 deletions
|
@ -54,8 +54,8 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
|
||||||
@override
|
@override
|
||||||
Future<void> close() async {
|
Future<void> close() async {
|
||||||
WidgetsBinding.instance.removeObserver(_observer);
|
WidgetsBinding.instance.removeObserver(_observer);
|
||||||
_cameraController?.dispose();
|
unawaited(_cameraController?.dispose());
|
||||||
super.close();
|
return super.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -110,11 +110,6 @@ class CameraContainerBloc extends EvSourceBlocBase<CameraContainerEvent, CameraC
|
||||||
emit(CameraInitializedState(_cameraController!));
|
emit(CameraInitializedState(_cameraController!));
|
||||||
|
|
||||||
_emitActiveState(emit);
|
_emitActiveState(emit);
|
||||||
_takePhoto().then((ev100) {
|
|
||||||
if (ev100 != null) {
|
|
||||||
communicationBloc.add(communication_event.MeasuredEvent(ev100));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
emit(const CameraErrorState());
|
emit(const CameraErrorState());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue