mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 23:40:41 +00:00
6566108994
* imlemented `CameraSpotDetector` * separated generic `DialogSwitch` * added `CameraFeature` model * added `CameraFeaturesListTile` to metering section * added features dialog subtitles * added long press to remove metering spot * translations * hide camera features for purchasable status * hide `CameraHistogram` & `CameraSpotDetector` if purchasable * bumped iap version * fixed tests * removed redundant camera state emission * tests * Fixed remote config initalization * updated pro features description
13 lines
429 B
Dart
13 lines
429 B
Dart
enum CameraFeature {
|
|
spotMetering,
|
|
histogram,
|
|
}
|
|
|
|
typedef CameraFeaturesConfig = Map<CameraFeature, bool>;
|
|
|
|
extension CameraFeaturesConfigJson on CameraFeaturesConfig {
|
|
static CameraFeaturesConfig fromJson(Map<String, dynamic> data) =>
|
|
<CameraFeature, bool>{for (final f in CameraFeature.values) f: data[f.name] as bool? ?? false};
|
|
|
|
Map<String, dynamic> toJson() => map((key, value) => MapEntry(key.name, value));
|
|
}
|