IAP
This commit is contained in:
parent
e630e43138
commit
75a02e9a7b
|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
|
||||||
const String kAppVersion = '0.1.50';
|
const String kAppVersion = '0.1.50';
|
||||||
const String kSiteUrl = 'https://invoiceninja.com';
|
const String kSiteUrl = 'https://invoiceninja.com';
|
||||||
const String kAppUrl = 'https://app.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 kPrivacyPolicyURL = 'https://www.invoiceninja.com/privacy-policy';
|
||||||
const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms';
|
const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/gestures.dart';
|
import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/resources/cached_image.dart';
|
import 'package:invoiceninja_flutter/ui/app/resources/cached_image.dart';
|
||||||
|
|
@ -162,12 +164,18 @@ class AppDrawer extends StatelessWidget {
|
||||||
: ListView(
|
: ListView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
if (isHosted(context) && !isPaidAccount(context))
|
if (Platform.isIOS &&
|
||||||
|
isHosted(context) &&
|
||||||
|
!isPaidAccount(context))
|
||||||
Material(
|
Material(
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(FontAwesomeIcons.superpowers, color: Colors.white,),
|
leading: Icon(
|
||||||
title: Text(localization.upgrade, style: TextStyle(color: Colors.white)),
|
FontAwesomeIcons.superpowers,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
title: Text(localization.upgrade,
|
||||||
|
style: TextStyle(color: Colors.white)),
|
||||||
onTap: () => showDialog<UpgradeDialog>(
|
onTap: () => showDialog<UpgradeDialog>(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
|
|
@ -480,8 +488,9 @@ class SidebarFooter extends StatelessWidget {
|
||||||
icon: Icon(Icons.info_outline),
|
icon: Icon(Icons.info_outline),
|
||||||
onPressed: () => showAbout(),
|
onPressed: () => showAbout(),
|
||||||
),
|
),
|
||||||
/*
|
if (!Platform.isIOS &&
|
||||||
if (isHosted(context) && !isPaidAccount(context)) ...[
|
isHosted(context) &&
|
||||||
|
!isPaidAccount(context)) ...[
|
||||||
Spacer(),
|
Spacer(),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text(localization.upgrade),
|
child: Text(localization.upgrade),
|
||||||
|
|
@ -494,7 +503,6 @@ class SidebarFooter extends StatelessWidget {
|
||||||
),
|
),
|
||||||
SizedBox(width: 14)
|
SizedBox(width: 14)
|
||||||
],
|
],
|
||||||
*/
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class UpgradeDialog extends StatefulWidget {
|
class UpgradeDialog extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
|
|
@ -176,15 +177,25 @@ class _UpgradeDialogState extends State<UpgradeDialog> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Text(localization.annualSubscription),
|
Text(localization.annualSubscription),
|
||||||
if (Platform.isIOS)
|
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(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text(localization.termsOfService),
|
child: Text(localization.termsOfService,
|
||||||
|
style: TextStyle(fontSize: 12)),
|
||||||
|
onPressed: () => launch(kTermsOfServiceURL),
|
||||||
),
|
),
|
||||||
FlatButton(
|
FlatButton(
|
||||||
child: Text(localization.privacyPolicy),
|
child: Text(localization.privacyPolicy,
|
||||||
|
style: TextStyle(fontSize: 12)),
|
||||||
|
onPressed: () => launch(kPrivacyPolicyURL),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue