omit camera measure on startup

This commit is contained in:
Vadim 2023-01-29 18:17:17 +03:00
parent c88a767d1a
commit c777bdb68e

View file

@ -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());
} }