save evsource

This commit is contained in:
Vadim 2023-01-29 19:38:27 +03:00
parent 2dc96e5c17
commit c110e06650
2 changed files with 20 additions and 22 deletions

View file

@ -60,5 +60,6 @@ class EvSourceTypeProviderState extends State<EvSourceTypeProvider> {
valueListenable.value = EvSourceType.camera;
break;
}
context.read<UserPreferencesService>().evSourceType = valueListenable.value;
}
}

View file

@ -37,28 +37,25 @@ class _MeteringScreenState extends State<MeteringScreen> {
children: [
Expanded(
child: BlocBuilder<MeteringBloc, MeteringState>(
builder: (context, state) => AnimatedSwitcher(
duration: Dimens.durationS,
child: context.watch<EvSourceType>() == 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>() == 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(