diff --git a/lib/providers/ev_source_type_provider.dart b/lib/providers/ev_source_type_provider.dart index 74b09d0..8c71d03 100644 --- a/lib/providers/ev_source_type_provider.dart +++ b/lib/providers/ev_source_type_provider.dart @@ -60,5 +60,6 @@ class EvSourceTypeProviderState extends State { valueListenable.value = EvSourceType.camera; break; } + context.read().evSourceType = valueListenable.value; } } diff --git a/lib/screens/metering/screen_metering.dart b/lib/screens/metering/screen_metering.dart index 9397e49..868dcf6 100644 --- a/lib/screens/metering/screen_metering.dart +++ b/lib/screens/metering/screen_metering.dart @@ -37,28 +37,25 @@ class _MeteringScreenState extends State { children: [ Expanded( child: BlocBuilder( - builder: (context, state) => AnimatedSwitcher( - duration: Dimens.durationS, - child: context.watch() == EvSourceType.camera - ? CameraContainerProvider( - fastest: state.fastest, - slowest: state.slowest, - iso: state.iso, - nd: state.nd, - onIsoChanged: (value) => _bloc.add(IsoChangedEvent(value)), - onNdChanged: (value) => _bloc.add(NdChangedEvent(value)), - exposurePairs: state.exposurePairs, - ) - : LightSensorContainerProvider( - fastest: state.fastest, - slowest: state.slowest, - iso: state.iso, - nd: state.nd, - onIsoChanged: (value) => _bloc.add(IsoChangedEvent(value)), - onNdChanged: (value) => _bloc.add(NdChangedEvent(value)), - exposurePairs: state.exposurePairs, - ), - ), + builder: (context, state) => context.watch() == EvSourceType.camera + ? CameraContainerProvider( + fastest: state.fastest, + slowest: state.slowest, + iso: state.iso, + nd: state.nd, + onIsoChanged: (value) => _bloc.add(IsoChangedEvent(value)), + onNdChanged: (value) => _bloc.add(NdChangedEvent(value)), + exposurePairs: state.exposurePairs, + ) + : LightSensorContainerProvider( + fastest: state.fastest, + slowest: state.slowest, + iso: state.iso, + nd: state.nd, + onIsoChanged: (value) => _bloc.add(IsoChangedEvent(value)), + onNdChanged: (value) => _bloc.add(NdChangedEvent(value)), + exposurePairs: state.exposurePairs, + ), ), ), MeteringBottomControls(