mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 00:40:39 +00:00
IAPProductType.equipment
-> IAPProductType.paidFeatures
This commit is contained in:
parent
7633f3fd27
commit
574900fdea
1 changed files with 5 additions and 2 deletions
|
@ -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<Environment>().buildType == BuildType.dev ||
|
||||
IAPProducts.isPurchased(context, IAPProductType.paidFeatures)) {
|
||||
Navigator.of(context).push<EquipmentProfileData>(
|
||||
MaterialPageRoute(builder: (_) => const EquipmentProfilesScreen()),
|
||||
);
|
||||
} else {
|
||||
IAPProductsProvider.of(context).buy(IAPProductType.equipment);
|
||||
IAPProductsProvider.of(context).buy(IAPProductType.paidFeatures);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue