This commit is contained in:
Hillel Coren 2019-09-03 09:03:06 +03:00
parent e630e43138
commit 75a02e9a7b
3 changed files with 29 additions and 9 deletions

View File

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
const String kAppVersion = '0.1.50';
const String kSiteUrl = 'https://invoiceninja.com';
const String kAppUrl = 'https://app.invoiceninja.com';
const String kAppPlansURL = 'https://www.invoiceninja.com/invoicing-pricing-plans/';
const String kPrivacyPolicyURL = 'https://www.invoiceninja.com/privacy-policy';
const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms';

View File

@ -1,3 +1,5 @@
import 'dart:io';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/ui/app/resources/cached_image.dart';
@ -162,12 +164,18 @@ class AppDrawer extends StatelessWidget {
: ListView(
shrinkWrap: true,
children: <Widget>[
if (isHosted(context) && !isPaidAccount(context))
if (Platform.isIOS &&
isHosted(context) &&
!isPaidAccount(context))
Material(
color: Colors.green,
child: ListTile(
leading: Icon(FontAwesomeIcons.superpowers, color: Colors.white,),
title: Text(localization.upgrade, style: TextStyle(color: Colors.white)),
leading: Icon(
FontAwesomeIcons.superpowers,
color: Colors.white,
),
title: Text(localization.upgrade,
style: TextStyle(color: Colors.white)),
onTap: () => showDialog<UpgradeDialog>(
context: context,
builder: (BuildContext context) {
@ -480,8 +488,9 @@ class SidebarFooter extends StatelessWidget {
icon: Icon(Icons.info_outline),
onPressed: () => showAbout(),
),
/*
if (isHosted(context) && !isPaidAccount(context)) ...[
if (!Platform.isIOS &&
isHosted(context) &&
!isPaidAccount(context)) ...[
Spacer(),
FlatButton(
child: Text(localization.upgrade),
@ -494,7 +503,6 @@ class SidebarFooter extends StatelessWidget {
),
SizedBox(width: 14)
],
*/
],
),
);

View File

@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/utils/formatting.dart';
import 'package:invoiceninja_flutter/utils/localization.dart';
import 'package:invoiceninja_flutter/utils/platforms.dart';
import 'package:url_launcher/url_launcher.dart';
class UpgradeDialog extends StatefulWidget {
@override
@ -176,15 +177,25 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
children: <Widget>[
Text(localization.annualSubscription),
if (Platform.isIOS)
Text('Payment will be charged to iTunes Account at confirmation of purchase. Subscription automatically renews unless auto-renew is turned off at least 24-hours before the end of the current period. Account will be charged for renewal within 24-hours prior to the end of the current period, and identify the cost of the renewal. Subscriptions may be managed by the user and auto-renewal may be turned off by going to the user\'s Account Settings after purchase.'),
Padding(
padding: const EdgeInsets.only(top: 8, bottom: 4),
child: Text(
'Payment will be charged to iTunes Account at confirmation of purchase. Subscription automatically renews unless auto-renew is turned off at least 24-hours before the end of the current period. Account will be charged for renewal within 24-hours prior to the end of the current period, and identify the cost of the renewal. Subscriptions may be managed by the user and auto-renewal may be turned off by going to the user\'s Account Settings after purchase.',
style: TextStyle(fontSize: 12, color: Colors.grey),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
FlatButton(
child: Text(localization.termsOfService),
child: Text(localization.termsOfService,
style: TextStyle(fontSize: 12)),
onPressed: () => launch(kTermsOfServiceURL),
),
FlatButton(
child: Text(localization.privacyPolicy),
child: Text(localization.privacyPolicy,
style: TextStyle(fontSize: 12)),
onPressed: () => launch(kPrivacyPolicyURL),
),
],
)