2023-04-05 19:15:11 +00:00
|
|
|
enum MeteringScreenLayoutFeature { extremeExposurePairs, filmPicker }
|
|
|
|
|
|
|
|
typedef MeteringScreenLayoutConfig = Map<MeteringScreenLayoutFeature, bool>;
|
|
|
|
|
|
|
|
extension MeteringScreenLayoutConfigJson on MeteringScreenLayoutConfig {
|
|
|
|
static MeteringScreenLayoutConfig fromJson(Map<String, dynamic> data) => data.map(
|
2023-05-11 13:30:18 +00:00
|
|
|
(key, value) => MapEntry(MeteringScreenLayoutFeature.values[int.parse(key)], value as bool),
|
|
|
|
);
|
2023-04-05 19:15:11 +00:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => map((key, value) => MapEntry(key.index.toString(), value));
|
|
|
|
}
|