m3_lightmeter/lib/data/models/app_feature.dart
Vadim 7c96b5a47d
ML-220 Show focal length when zooming (#233)
* extract focal length from exif

* added focal length section

* wip

* [android] calculate EFL

* split other platform handlers to separate files

* [ios] calculate EFL

* updated translations

* deleted `focalLengthFromTags`

* fixed unit tests

* [ios] link missing files

* updated Pro features screen

* [ios] fixed signing

* fixed screenshot generator

* updated goldens

* [android] updated store screenshots

* wip

* [ios] updated store screenshots

* enable focal length feature by default

* mock camera focal length for integration tests

* cleanup

* added logging to `CameraInfoService`
2025-05-14 10:26:59 +02:00

59 lines
1.8 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lightmeter/generated/l10n.dart';
enum AppFeature {
reflectedLightMetering,
incidedntLightMetering,
isoAndNdValues,
themeEngine,
spotMeteringAndHistogram,
focalLength,
listOfFilms,
customFilms,
equipmentProfiles,
timer,
mainScreenCustomization;
static List<AppFeature> get androidFeatures => values;
static List<AppFeature> get iosFeatures => values.where((f) => f != AppFeature.incidedntLightMetering).toList();
String name(BuildContext context) {
switch (this) {
case AppFeature.reflectedLightMetering:
return S.of(context).featureReflectedLightMetering;
case AppFeature.incidedntLightMetering:
return S.of(context).featureIncidentLightMetering;
case AppFeature.isoAndNdValues:
return S.of(context).featureIsoAndNdValues;
case AppFeature.themeEngine:
return S.of(context).featureTheme;
case AppFeature.spotMeteringAndHistogram:
return S.of(context).featureSpotMeteringAndHistorgram;
case AppFeature.focalLength:
return S.of(context).featureFocalLength35mm;
case AppFeature.listOfFilms:
return S.of(context).featureListOfFilms;
case AppFeature.customFilms:
return S.of(context).featureCustomFilms;
case AppFeature.equipmentProfiles:
return S.of(context).featureEquipmentProfiles;
case AppFeature.timer:
return S.of(context).featureTimer;
case AppFeature.mainScreenCustomization:
return S.of(context).featureMeteringScreenLayout;
}
}
bool get isFree {
switch (this) {
case AppFeature.reflectedLightMetering:
case AppFeature.incidedntLightMetering:
case AppFeature.isoAndNdValues:
case AppFeature.themeEngine:
return true;
default:
return false;
}
}
}