mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-25 17:00:39 +00:00
added loader for IAPProductStatus.pending
This commit is contained in:
parent
62833e79bf
commit
c99a172d66
1 changed files with 8 additions and 2 deletions
|
@ -2,6 +2,7 @@ import 'dart:developer';
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lightmeter/generated/l10n.dart';
|
||||
import 'package:lightmeter/res/dimens.dart';
|
||||
import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart';
|
||||
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
|
||||
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
|
||||
|
@ -11,7 +12,8 @@ class EquipmentProfilesListTile extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final paidStatus = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status;
|
||||
final paidStatus = IAPProducts.productOf(context, IAPProductType.paidFeatures)?.status ??
|
||||
IAPProductStatus.pending;
|
||||
log(paidStatus.toString());
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.camera),
|
||||
|
@ -29,7 +31,11 @@ class EquipmentProfilesListTile extends StatelessWidget {
|
|||
},
|
||||
trailing: switch (paidStatus) {
|
||||
IAPProductStatus.purchasable => const Icon(Icons.lock),
|
||||
null => const Icon(Icons.lock),
|
||||
IAPProductStatus.pending => const SizedBox(
|
||||
height: Dimens.grid24,
|
||||
width: Dimens.grid24,
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
_ => null,
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue