Change yearly subscription to 'One Time Purchase'

I could have a yearly subscription as well, but the screen is confusing
enough as it is. Also, by next year - I should have the Stripe
Integration running and I can possibly avoid the extra 30%.
This commit is contained in:
Vishesh Handa
2020-08-31 17:28:08 +02:00
parent f1fa527ecd
commit 957638d8a1
5 changed files with 16 additions and 13 deletions

View File

@ -255,5 +255,5 @@ purchase_screen:
desc: 'GitJournal is completely open source and is the result of significant development work. It has no venture capital or corporation backing. Your support directly sustains development. desc: 'GitJournal is completely open source and is the result of significant development work. It has no venture capital or corporation backing. Your support directly sustains development.
GitJournal operates on a "pay what you want model (with a minimum)". No matter what you pay you will get access to all the Pro features.' GitJournal operates on a "pay what you want model (with a minimum)".'
restore: Restore Purchase restore: Restore Purchase

View File

@ -35,11 +35,11 @@ class PurchaseScreen extends StatelessWidget {
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
PurchaseCards( PurchaseCards(
children: [ children: [
const SizedBox(width: 16.0),
const MonthlyRentalWidget(),
const SizedBox(width: 16.0), const SizedBox(width: 16.0),
const YearlyPurchaseWidget(), const YearlyPurchaseWidget(),
const SizedBox(width: 16.0), const SizedBox(width: 16.0),
const MonthlyRentalWidget(),
const SizedBox(width: 16.0),
], ],
), ),
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
@ -96,7 +96,9 @@ class MonthlyRentalWidget extends StatelessWidget {
child: Column( child: Column(
children: [ children: [
// TODO: Translate this // TODO: Translate this
Text("Monthly Rental", style: textTheme.headline5), Text("One Time Purchase", style: textTheme.headline5),
const SizedBox(height: 8.0),
Text("Paid Monthly", style: textTheme.subtitle1),
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
PurchaseWidget( PurchaseWidget(
skus: _generateSkus(), skus: _generateSkus(),
@ -106,7 +108,7 @@ class MonthlyRentalWidget extends StatelessWidget {
), ),
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
const Text( const Text(
"After 12 months of rental or after paying the min yearly amount, you will automatically get all the benefits of a Yearly Purchase."), "After 12 months or after paying the minimum 'One Time Purchase' amount, you will get all the benefits of a standard 'One Time Purchase'"),
], ],
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
), ),
@ -134,17 +136,18 @@ class YearlyPurchaseWidget extends StatelessWidget {
return PurchaseCard( return PurchaseCard(
child: Column( child: Column(
children: [ children: [
Text("Yearly Purchase", style: textTheme.headline5), Text("One Time Purchase", style: textTheme.headline5),
const Spacer(),
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
PurchaseWidget( PurchaseWidget(
skus: _generateSkus(), skus: _generateSkus(),
defaultSku: "sku_sub_yearly_1", defaultSku: "sku_yearly_1",
timePeriod: "Year", timePeriod: "Year",
isSubscription: false, isSubscription: false,
), ),
const SizedBox(height: 32.0), const SizedBox(height: 32.0),
const Text( const Text(
"Enables all Pro features currently in GitJournal and new features added in the following 12 months. These features will be yours forever.") "Permanently enable all Pro features currently in GitJournal and new features added in the following 12 months."),
], ],
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
), ),
@ -154,7 +157,7 @@ class YearlyPurchaseWidget extends StatelessWidget {
Set<String> _generateSkus() { Set<String> _generateSkus() {
var list = <String>{}; var list = <String>{};
for (var i = 0; i <= 20; i++) { for (var i = 0; i <= 20; i++) {
list.add("sku_sub_yearly_$i"); list.add("sku_yearly_$i");
} }
return list; return list;
} }

View File

@ -26,8 +26,8 @@ class PurchaseButton extends StatelessWidget {
return RaisedButton( return RaisedButton(
child: subscription child: subscription
? Text('Subscribe for $price / $timePeriod') ? Text('Purchase for $price / $timePeriod')
: Text('Purchase for $price / $timePeriod'), : Text('Purchase for $price'),
color: Theme.of(context).primaryColor, color: Theme.of(context).primaryColor,
padding: const EdgeInsets.fromLTRB(32.0, 16.0, 32.0, 16.0), padding: const EdgeInsets.fromLTRB(32.0, 16.0, 32.0, 16.0),
onPressed: product != null ? () => _initPurchase(context) : null, onPressed: product != null ? () => _initPurchase(context) : null,

View File

@ -445,7 +445,7 @@ packages:
name: in_app_purchase name: in_app_purchase
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.4+1" version: "0.3.4+5"
intl: intl:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -54,7 +54,7 @@ dependencies:
easy_localization_loader: ^0.0.2 easy_localization_loader: ^0.0.2
quick_actions: ^0.4.0+5 quick_actions: ^0.4.0+5
receive_sharing_intent: ^1.4.0+2 receive_sharing_intent: ^1.4.0+2
in_app_purchase: ^0.3.4+1 in_app_purchase: ^0.3.4+5
flutter_plugin_android_lifecycle: ^1.0.8 # for fixing the build flutter_plugin_android_lifecycle: ^1.0.8 # for fixing the build
dev_dependencies: dev_dependencies: