mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20: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
|
@ -77,11 +77,21 @@ class _InheritedListeners extends StatelessWidget {
|
||||||
context.read<MeteringBloc>().add(EquipmentProfileChangedEvent(value));
|
context.read<MeteringBloc>().add(EquipmentProfileChangedEvent(value));
|
||||||
},
|
},
|
||||||
child: InheritedModelAspectListener<MeteringScreenLayoutFeature, bool>(
|
child: InheritedModelAspectListener<MeteringScreenLayoutFeature, bool>(
|
||||||
aspect: MeteringScreenLayoutFeature.filmPicker,
|
aspect: MeteringScreenLayoutFeature.equipmentProfiles,
|
||||||
onDidChangeDependencies: (value) {
|
onDidChangeDependencies: (value) {
|
||||||
if (!value) context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
if (!value) {
|
||||||
|
EquipmentProfileProvider.of(context).setProfile(context.get<EquipmentProfiles>().first);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: child,
|
child: InheritedModelAspectListener<MeteringScreenLayoutFeature, bool>(
|
||||||
|
aspect: MeteringScreenLayoutFeature.filmPicker,
|
||||||
|
onDidChangeDependencies: (value) {
|
||||||
|
if (!value) {
|
||||||
|
context.read<MeteringBloc>().add(const FilmChangedEvent(Film.other()));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: child,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue