Fix presentPaywallIfNeeded#904
Merged
Merged
Conversation
tonidero
commented
Dec 22, 2023
| case "presentPaywallIfNeeded": | ||
| final String requiredEntitlementIdentifier = call.argument("requiredEntitlementIdentifier"); | ||
| presentPaywall(result, requiredEntitlementIdentifier); | ||
| break; |
Contributor
Author
There was a problem hiding this comment.
We probably would want to also add some tests for these but didn't want to delay fixing this... Definitely we should improve our coverage in the hybrids.
vegaro
approved these changes
Dec 22, 2023
| case "presentPaywallIfNeeded": | ||
| final String requiredEntitlementIdentifier = call.argument("requiredEntitlementIdentifier"); | ||
| presentPaywall(result, requiredEntitlementIdentifier); | ||
| break; |
Contributor
Author
|
The freezed tests are unrelated to this PR |
Merged
tonidero
added a commit
that referenced
this pull request
Dec 22, 2023
### New Features * 📱 Initial support for cross-platform RevenueCat Paywalls 🐾 🧱 (#852) #### Instructions: - For Android, you need to change your `MainActivity` to subclass `FlutterFragmentActivity` instead of `FlutterActivity`. - Update `purchases-flutter` in your `pubspec.yaml`: ```yaml dependencies: purchases_flutter: 6.6.0-beta.3 ``` #### Usage: ```dart await Purchases.presentPaywallIfNeeded("pro"); ``` #### Limitations: - Currently only full screen paywalls are supported - There is no way to detect paywall events other than using `addCustomerInfoUpdateListener` - Android's `minSdkVersion` is temporarily increased from `19` to `24` to support paywalls. This will be reverted in a future release as we split `purchases_flutter` and `purchases_flutter_ui` ### Breaking changes from previous beta - `PurchasesFlutterActivity` has been removed. Use `FlutterFragmentActivity` provided by Flutter instead ### Fixes from previous beta * Fix `presentPaywallIfNeeded` (#904) via Toni Rico (@tonidero) ### Other Changes * Update paywalls latest main (#906) via Toni Rico (@tonidero) * Update to use PHC PaywallHelpers instead of custom activity (#903) via Toni Rico (@tonidero) * Fix flutter analyze deprecation warnings (#872)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We forgot a
breakwhen calling this method, which caused it to fall to thedefaultcase, resulting in the result being called twice, causing a crash. This deals with #902