feat: add support for custom async condition before showing review dialog#18
Open
benco8186 wants to merge 5 commits into
Open
feat: add support for custom async condition before showing review dialog#18benco8186 wants to merge 5 commits into
benco8186 wants to merge 5 commits into
Conversation
update min SDK and compile SDK version
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.
📌 Description
This PR adds support for custom asynchronous conditions before displaying the in-app review dialog using InAppReviewManager.
Developers can now register app-specific conditions (e.g., minimum score, feature usage, session count) that must return true before the rating dialog is shown. This provides greater flexibility and control over when and how to prompt users for reviews.
✅ What's Included
- New method:
addCustomConditionBeforeShowDialog(AsyncValueGetter condition)
Allows registering async conditions to be evaluated before triggering the dialog.
- New private method:
_checkCustomConditions()
Executes all added conditions before allowing the dialog to appear.
Integration into _shouldShowRateDialog() logic.
🧪 How to Use
🔍 Notes
All custom conditions are evaluated in order.
If any condition returns false, the review dialog will not be shown.
Maintains method chaining and backward compatibility.
Let me know if you want to include screenshots, test results, or additional usage examples!