mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 00:40:39 +00:00
reset selected equipment profile when layout feature is disabled
This commit is contained in:
parent
b42ad01b7c
commit
7633f3fd27
1 changed files with 13 additions and 3 deletions
|
@ -76,13 +76,23 @@ class _InheritedListeners extends StatelessWidget {
|
|||
onDidChangeDependencies: (value) {
|
||||
context.read<MeteringBloc>().add(EquipmentProfileChangedEvent(value));
|
||||
},
|
||||
child: InheritedModelAspectListener<MeteringScreenLayoutFeature, bool>(
|
||||
aspect: MeteringScreenLayoutFeature.equipmentProfiles,
|
||||
onDidChangeDependencies: (value) {
|
||||
if (!value) {
|
||||
EquipmentProfileProvider.of(context).setProfile(context.get<EquipmentProfiles>().first);
|
||||
}
|
||||
},
|
||||
child: InheritedModelAspectListener<MeteringScreenLayoutFeature, bool>(
|
||||
aspect: MeteringScreenLayoutFeature.filmPicker,
|
||||
onDidChangeDependencies: (value) {
|
||||
if (!value) context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
||||
if (!value) {
|
||||
context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
||||
}
|
||||
},
|
||||
child: child,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue