Compare commits

...

3 commits

Author SHA1 Message Date
Vadim
9ef7764b58 Update shared_prefs_service.dart 2023-07-16 11:45:49 +02:00
Vadim
6f0072ad3e updated packages versions 2023-07-16 11:31:57 +02:00
Vadim
574900fdea IAPProductType.equipment -> IAPProductType.paidFeatures 2023-07-16 11:31:29 +02:00
3 changed files with 23 additions and 15 deletions

View file

@ -7,6 +7,7 @@ import 'package:lightmeter/data/models/metering_screen_layout_config.dart';
import 'package:lightmeter/data/models/supported_locale.dart'; import 'package:lightmeter/data/models/supported_locale.dart';
import 'package:lightmeter/data/models/theme_type.dart'; import 'package:lightmeter/data/models/theme_type.dart';
import 'package:lightmeter/data/models/volume_action.dart'; import 'package:lightmeter/data/models/volume_action.dart';
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences/shared_preferences.dart';
@ -148,9 +149,13 @@ class UserPreferencesService {
); );
set film(Film value) => _sharedPreferences.setString(filmKey, value.name); set film(Film value) => _sharedPreferences.setString(filmKey, value.name);
String get selectedEquipmentProfileId => ''; // coverage:ignore-line String get selectedEquipmentProfileId => _sharedPreferences.selectedEquipmentProfileId;
set selectedEquipmentProfileId(String id) {} // coverage:ignore-line set selectedEquipmentProfileId(String id) {
_sharedPreferences.selectedEquipmentProfileId = id;
}
List<EquipmentProfileData> get equipmentProfiles => []; // coverage:ignore-line List<EquipmentProfileData> get equipmentProfiles => _sharedPreferences.equipmentProfiles;
set equipmentProfiles(List<EquipmentProfileData> profiles) {} // coverage:ignore-line set equipmentProfiles(List<EquipmentProfileData> profiles) {
_sharedPreferences.equipmentProfiles = profiles;
}
} }

View file

@ -1,6 +1,8 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:lightmeter/environment.dart';
import 'package:lightmeter/generated/l10n.dart'; import 'package:lightmeter/generated/l10n.dart';
import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart'; import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart';
import 'package:lightmeter/utils/inherited_generics.dart';
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart'; import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
@ -13,12 +15,13 @@ class EquipmentProfilesListTile extends StatelessWidget {
leading: const Icon(Icons.camera), leading: const Icon(Icons.camera),
title: Text(S.of(context).equipmentProfiles), title: Text(S.of(context).equipmentProfiles),
onTap: () { onTap: () {
if (IAPProducts.isPurchased(context, IAPProductType.equipment)) { if (context.get<Environment>().buildType == BuildType.dev ||
IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) {
Navigator.of(context).push<EquipmentProfileData>( Navigator.of(context).push<EquipmentProfileData>(
MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()), MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()),
); );
} else { } else {
IAPProductsProvider.of(context).buy(IAPProductType.equipment); IAPProductsProvider.of(context).buy(IAPProductType.paidFeatures);
} }
}, },
); );

View file

@ -1,5 +1,5 @@
name: lightmeter name: lightmeter
description: A new Flutter project. description: Lightmeter app inspired by Material 3 design system.
publish_to: "none" publish_to: "none"
version: 0.12.0+31 version: 0.12.0+31
@ -9,12 +9,12 @@ environment:
dependencies: dependencies:
app_settings: 4.2.0 app_settings: 4.2.0
bloc_concurrency: 0.2.2 bloc_concurrency: 0.2.2
camera: 0.10.5 camera: 0.10.5+2
clipboard: 0.1.3 clipboard: 0.1.3
dynamic_color: 1.6.5 dynamic_color: 1.6.6
exif: 3.1.4 exif: 3.1.4
firebase_core: 2.14.0 firebase_core: 2.14.0
firebase_crashlytics: 3.3.1 firebase_crashlytics: 3.3.3
flutter: flutter:
sdk: flutter sdk: flutter
flutter_bloc: 8.1.3 flutter_bloc: 8.1.3
@ -32,17 +32,17 @@ dependencies:
url: "https://github.com/vodemn/m3_lightmeter_resources" url: "https://github.com/vodemn/m3_lightmeter_resources"
ref: main ref: main
material_color_utilities: 0.2.0 material_color_utilities: 0.2.0
package_info_plus: 4.0.1 package_info_plus: 4.0.2
permission_handler: 10.2.0 permission_handler: 10.4.3
platform: 3.1.0 platform: 3.1.0
shared_preferences: 2.2.0 shared_preferences: 2.2.0
url_launcher: 6.1.11 url_launcher: 6.1.12
uuid: 3.0.7 uuid: 3.0.7
vibration: 1.7.7 vibration: 1.8.1
dev_dependencies: dev_dependencies:
bloc_test: 9.1.3 bloc_test: 9.1.3
build_runner: ^2.1.7 build_runner: 2.4.6
flutter_launcher_icons: 0.11.0 flutter_launcher_icons: 0.11.0
flutter_native_splash: 2.2.16 flutter_native_splash: 2.2.16
flutter_test: flutter_test: