mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 07:50:42 +00:00
11 lines
534 B
Dart
11 lines
534 B
Dart
enum MeteringScreenLayoutFeature { equipmentProfiles, extremeExposurePairs, filmPicker }
|
|
|
|
typedef MeteringScreenLayoutConfig = Map<MeteringScreenLayoutFeature, bool>;
|
|
|
|
extension MeteringScreenLayoutConfigJson on MeteringScreenLayoutConfig {
|
|
static MeteringScreenLayoutConfig fromJson(Map<String, dynamic> data) => data.map(
|
|
(key, value) => MapEntry(MeteringScreenLayoutFeature.values[int.parse(key)], value as bool),
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => map((key, value) => MapEntry(key.index.toString(), value));
|
|
}
|