47 Commits

Author SHA1 Message Date
0b5701b739 Move purchasing logic to PurchaseManager
Hopefully with this there will never be any more problems of purchases
not being completed.
2020-11-27 17:19:42 +01:00
4eff5844b1 Cleanup PurchaseScreen
Avoid having one widget call the other widget with the sku price. It was
complicating the entire code base. Also, create a new class
PurchaseManager which is a singleton and will be used to manage all
purchases from now on.

The earlier approach of having the code in a widget would sometimes
result in purchases not being confirmed. I'm hoping that putting the
class in a singleton will help.
2020-11-27 16:28:58 +01:00
5da69de515 Improve log message 2020-11-08 10:38:59 +01:00
699f79ae4c Add a few more log statements
ConfirmProPurchase doesn't seem to be working for everyone on iOS
2020-11-07 14:31:15 +01:00
39339a23f1 PurchaseWidget: Simplify code 2020-10-22 22:51:30 +02:00
43269bbe53 Add lots of listen: false when using Provider
Provider version 4 has an assert which fires if used incorrectly.
2020-09-28 00:09:14 +02:00
fe08834259 Split Settings into AppSettings and Settings
This way I can eventually change Settings into RepoSettings without
breaking anything.
2020-09-25 00:33:54 +02:00
984fc6864e Make all remaining strings translatable 2020-09-08 23:01:39 +02:00
461a887514 log completePurchase errors
This payment stuff is quite complicated!
2020-09-07 22:36:45 +02:00
1fff957c8b PurchaseWidget: Mark the strings as translatable
Also show a dialog to a user so they don't keep trying to click again
and again.
2020-09-07 21:46:03 +02:00
c229b7c2e8 PurchaseWidget: Log the exceptions 2020-09-07 21:43:40 +02:00
618ae071b9 PurchaseScreen: Center align the text
For smaller screens
2020-09-07 21:38:47 +02:00
16fae264de PurchaseWidget: Make sure it is still mounted before calling callback
Fixes APP-B1
2020-09-05 12:50:31 +02:00
9db05bb7d8 PurchaseWidget: Handle when it fails to load options
Fixes APP-AY
2020-09-03 11:55:43 +02:00
40b5afdb7b IAP Verify Fail: Report it to Sentry
Not as analytics. This should typically never be happening.
2020-09-03 08:30:17 +02:00
4596e11ab4 PurchaseScreen: Make all strings translatable 2020-09-01 10:48:05 +02:00
588f1db263 PurchaseScreen: Change the text
* Call it a Monthly Subscription - as that is exactly what it is
2020-09-01 10:38:19 +02:00
4c324a1194 IAP: Ignore user cancelled errors 2020-09-01 10:30:09 +02:00
b3bdb8657c Handle IAP of products
We were only handling subscriptions properly
2020-09-01 10:29:50 +02:00
822607ba18 Add extra logs 2020-09-01 09:18:16 +02:00
3bcbe5a71d IAP: Do not consume the purchase
Otherwise it will not show up when querying past purchases
2020-09-01 09:17:33 +02:00
b35db2a343 IAP: Exit after an error
Do not try to consume the purchase
2020-09-01 08:51:37 +02:00
7a23915686 Clarify the the Monthly Purchase option text
Clearly show how much they would need to pay in order for it to convert
into a normal One Time Purchase.
2020-08-31 18:00:07 +02:00
957638d8a1 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%.
2020-08-31 17:28:08 +02:00
b6f9c27bf1 PurchaseScreen: Change text of yearly to "Purchase"
Instead of "Subscribe". Maybe this will help.
2020-08-21 11:37:02 +02:00
518ae9d4ef First Iteration of Yearly Purchase 2020-08-20 09:32:40 +02:00
7d88ef0399 Add a YearlyPurchaseWidget - disabled for now
Abstract out the PurchaseWidget and use it for both monthly and yearly
purchases. The yearly purchases hasn't been enabled so far, as the IAPs
still need to be approved on iOS and the PageView widget I was using to
switch between the two options isn't giving me what I want.
2020-08-19 16:39:42 +02:00
f4ab547fd5 Change default purchase amount 2020-08-19 12:31:27 +02:00
6f3eff20e8 Remove sku_monthly_min 2020-08-19 12:29:54 +02:00
7936cc70b8 Analytics: Make all events into enums
No more random strings
2020-08-17 15:29:38 +02:00
5066a2a729 IAP: Always enable pending purchases 2020-08-14 16:08:13 +02:00
c6e4cf3d8a Note's parent shouldn't even be null 2020-08-12 19:20:36 +02:00
990efc8f7b Add a 'Restore Purchase' button
Instead of doing it automatically,

Fixes #211
2020-08-12 19:05:58 +02:00
199b9682bc PurchaseSlider: Get the largest amount as well 2020-08-12 18:50:28 +02:00
21447a09e0 PurchaseSlider: Fix it
It was a bit wonky
2020-08-12 18:50:10 +02:00
9d55b449d3 Settings: Access it through the Provider
Make it a ChageNotifier and try to access it through the Provider
instead of like a global variable. This way, the state is better
managed and it'll be easier to split out Settings into smaller classes.
2020-08-09 01:29:22 +02:00
28d53242d8 Move away from RevenueCat
The iOS updates keep getting rejected, and I think it's because
RevenueCat is taking too long to respond. Additionally, revenueCat
doesn't really give us anything useful as its receipt validation isn't
perfect, and I've had to roll my own.

Plus from a privacy point of view, this is better as we are no longer
talking to any third party service.

This has so far only been tested on iOS
2020-07-26 12:20:09 +02:00
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
5253c7bdd1 PurcahseWidget: Log the revenuecat errors
These shouldn't be happening.
2020-07-23 18:00:33 +02:00
33f34936fa PurchaseWidget: Show an error on the screen
Instead of via a scaffold
2020-07-23 17:59:44 +02:00
5d7f616c6e const++ 2020-07-21 10:46:03 +02:00
c24cca6395 PurchaseWidget: Use the correct scaffold 2020-07-14 20:59:50 +02:00
e6d479d804 Increase the default price
It'll be nice experiment to see if this results in people paying more.
2020-07-09 16:52:17 +02:00
a861c16e8f PurchaseSlider: Add buttons to make chosing the price easier
This way we can more easily choose the value, as the slider is quite
buggy.
2020-07-09 16:50:27 +02:00
94730c7040 PurchaseWidget: Move slider to its own file
Also de-couple it from RevenueCat specific APIs.
2020-07-09 16:31:49 +02:00
51d79fdbf2 PurchaseScreen: Fix scrolling
Putting a column inside a SingleChildScrollView is way way too complex.
There are lots of different solutions, and not all seem to work for me.

Also adjust the loading screen.
2020-07-09 13:21:23 +02:00
4109563293 Move PurchaseWidget to its own file 2020-07-09 12:25:30 +02:00