mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-22 07:20:39 +00:00
c66381f813
* sync with resources * separated `ExpandableSectionList` as widget * fixed generic type * implemented `FilmsScreen` (wip) * made `SliverScreen` title a widget * [`FilmEditScreen`] wip * [`FilmEditScreen`] added validation * fixed title overflow for `SliverScreen` * [`FilmEditScreen`] separated add and edit blocs * [`FilmEditScreen`] split into separate components * added bottom widget to `SliverScreen` * implemented films list tabs fo `FilmsScreen` * added films screen to navigation * replaced explicit routes names with enum values * implemented CRUD for custom films * added placeholder for empty custom films list * added `FilmsStorageService` * fixed unit tests * fixed integration tests * lint * fixed golden tests * added iap stub methods * added custom films to features list * use 2.0.0 resouces * fixed film picket tests * migrated to iap 1.0.1 * autofocus film name field * wait for the film to edited * migrated to iap 1.1.0 * typo * wait for storage initialization * migrated to iap 1.1.1 * fixed films initialization * added conditions to films model `updateShouldNotifyDependent` * typo * fixed select film discard notify * covered films model `updateShouldNotifyDependent`
59 lines
1.8 KiB
Dart
59 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lightmeter/generated/l10n.dart';
|
|
|
|
enum AppFeature {
|
|
reflectedLightMetering,
|
|
incidedntLightMetering,
|
|
isoAndNdValues,
|
|
themeEngine,
|
|
spotMetering,
|
|
histogram,
|
|
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.spotMetering:
|
|
return S.of(context).featureSpotMetering;
|
|
case AppFeature.histogram:
|
|
return S.of(context).featureHistogram;
|
|
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;
|
|
}
|
|
}
|
|
}
|