mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 16:30:40 +00:00
f0d707b071
* Upgraded `targetSdkVersion` to 34
* added price to `IAPProduct`
* implemented `ProFeaturesScreen` (wip)
* finalized `ProFeaturesScreen` layout
* replaced `ProFeaturesDialog` with `ProFeaturesScreen`
* added translations
* fixed feature checkbox width calculation
* fixed tests
* separated android & ios features
* NPE
* changed "get pro" tile colors
* unified Lightmeter Pro related naming
* typo
* updated golden tests
* use iap 0.11.0
* revert unrelated changes
This reverts commit bae5ead8f0
.
* lint
* adjusted eng translation
* updated goldens
56 lines
1.7 KiB
Dart
56 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/generated/l10n.dart';
|
|
|
|
enum AppFeature {
|
|
reflectedLightMetering,
|
|
incidedntLightMetering,
|
|
isoAndNdValues,
|
|
themeEngine,
|
|
spotMetering,
|
|
histogram,
|
|
listOfFilms,
|
|
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.spotMetering:
|
|
return S.of(context).featureSpotMetering;
|
|
case AppFeature.histogram:
|
|
return S.of(context).featureHistogram;
|
|
case AppFeature.listOfFilms:
|
|
return S.of(context).featureListOfFilms;
|
|
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;
|
|
}
|
|
}
|
|
}
|