2023-07-13 21:47:21 +00:00
|
|
|
enum MeteringScreenLayoutFeature {
|
|
|
|
extremeExposurePairs,
|
|
|
|
filmPicker,
|
2023-08-15 09:59:27 +00:00
|
|
|
histogram,
|
2023-07-13 21:47:21 +00:00
|
|
|
equipmentProfiles,
|
|
|
|
}
|
2023-04-05 19:15:11 +00:00
|
|
|
|
|
|
|
typedef MeteringScreenLayoutConfig = Map<MeteringScreenLayoutFeature, bool>;
|
|
|
|
|
|
|
|
extension MeteringScreenLayoutConfigJson on MeteringScreenLayoutConfig {
|
2023-07-13 21:47:21 +00:00
|
|
|
static MeteringScreenLayoutConfig fromJson(Map<String, dynamic> data) =>
|
|
|
|
<MeteringScreenLayoutFeature, bool>{
|
|
|
|
for (final f in MeteringScreenLayoutFeature.values)
|
|
|
|
f: data[f.index.toString()] as bool? ?? true
|
|
|
|
};
|
2023-04-05 19:15:11 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => map((key, value) => MapEntry(key.index.toString(), value));
|
|
|
|
}
|