From 574900fdea5e06b4477ce0035d374a5389f73215 Mon Sep 17 00:00:00 2001 From: Vadim Date: Sun, 16 Jul 2023 11:31:29 +0200 Subject: [PATCH] `IAPProductType.equipment` -> `IAPProductType.paidFeatures` --- .../widget_list_tile_equipment_profiles.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/screens/settings/components/metering/components/equipment_profiles/widget_list_tile_equipment_profiles.dart b/lib/screens/settings/components/metering/components/equipment_profiles/widget_list_tile_equipment_profiles.dart index f2efa4d..dd3c57d 100644 --- a/lib/screens/settings/components/metering/components/equipment_profiles/widget_list_tile_equipment_profiles.dart +++ b/lib/screens/settings/components/metering/components/equipment_profiles/widget_list_tile_equipment_profiles.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; +import 'package:lightmeter/environment.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/utils/inherited_generics.dart'; import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; @@ -13,12 +15,13 @@ class EquipmentProfilesListTile extends StatelessWidget { leading: const Icon(Icons.camera), title: Text(S.of(context).equipmentProfiles), onTap: () { - if (IAPProducts.isPurchased(context, IAPProductType.equipment)) { + if (context.get().buildType == BuildType.dev || + IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) { Navigator.of(context).push( MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()), ); } else { - IAPProductsProvider.of(context).buy(IAPProductType.equipment); + IAPProductsProvider.of(context).buy(IAPProductType.paidFeatures); } }, );