In-app purchase

This commit is contained in:
Hillel Coren 2022-10-12 19:24:33 +03:00
parent 1197e9650d
commit a4840854da
3 changed files with 7 additions and 6 deletions

View File

@ -69,7 +69,7 @@ class EditScaffold extends StatelessWidget {
(entity?.isEditable ?? true);
bool isCancelEnabled = false;
String upgradeMessage = state.userCompany.isOwner
? (state.account.trialStarted.isEmpty
? (state.account.isEligibleForTrial && !supportsInAppPurchase()
? localization.startFreeTrialMessage
: localization.upgradeToPaidPlan)
: localization.ownerUpgradeToPaidPlan;

View File

@ -467,7 +467,7 @@ class _MenuDrawerState extends State<MenuDrawer> {
if (state.userCompany.isOwner &&
state.isHosted &&
!isPaidAccount(context) &&
!isApple() &&
(!isApple() || supportsInAppPurchase()) &&
kReleaseMode)
Material(
child: Tooltip(

View File

@ -345,10 +345,11 @@ class _AccountOverview extends StatelessWidget {
padding: const EdgeInsets.all(8.0),
child: IconText(
icon: MdiIcons.openInNew,
text: (account.isEligibleForTrial
? localization.startFreeTrial
: localization.changePlan)
.toUpperCase(),
text:
(account.isEligibleForTrial && !supportsInAppPurchase()
? localization.startFreeTrial
: localization.changePlan)
.toUpperCase(),
),
),
onPressed: () {