mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 16:30:40 +00:00
886188bb9e
* Added histogram and separated camera view builder * Added histogram to `MeteringScreenLayoutConfig` * `ResolutionPreset.medium` -> `ResolutionPreset.low` * Adjusted histogram paddings
13 lines
572 B
Dart
13 lines
572 B
Dart
enum MeteringScreenLayoutFeature { extremeExposurePairs, filmPicker, histogram }
|
|
|
|
typedef MeteringScreenLayoutConfig = Map<MeteringScreenLayoutFeature, bool>;
|
|
|
|
extension MeteringScreenLayoutConfigJson on MeteringScreenLayoutConfig {
|
|
static MeteringScreenLayoutConfig fromJson(Map<String, dynamic> data) =>
|
|
<MeteringScreenLayoutFeature, bool>{
|
|
for (final f in MeteringScreenLayoutFeature.values)
|
|
f: data[f.index.toString()] as bool? ?? true
|
|
};
|
|
|
|
Map<String, dynamic> toJson() => map((key, value) => MapEntry(key.index.toString(), value));
|
|
}
|