SmartReviewPrompter class

The main class for the Smart Review Prompter.

Properties

hashCode int
The hash code for this object.
no setterinherited
inAppReviewInstance ← InAppReview
Allows overriding the InAppReview instance for unit testing.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getAppOpenCount() Future<int>
Get the current number of times the app has been opened.
getDaysSinceInstall() Future<int>
Get the number of days passed since the app was first installed.
getLastPromptDate() Future<DateTime?>
Get the timestamp of the last time the prompt was shown.
getPromptCount() Future<int>
Get the total number of times the prompt has been shown.
hasUserAlreadyRated() Future<bool>
Check if the user has already rated.
incrementAppOpenCount() Future<void>
Call this method every time the app is opened (e.g., in main.dart).
initialize() Future<void>
Call this method once in main.dart to initialize the package.
markUserAsRated() Future<void>
Call this when the user has completed rating the app (e.g., from an in-app button, custom rating dialog, or settings menu). This permanently disables future prompts.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() Future<void>
Reset all stored parameters. Useful for debugging and testing.
toString() String
A string representation of this object.
inherited
tryShowingReview(SmartReviewConditions conditions) Future<void>
Call this method when you want to check conditions and possibly show the review. For example, after a user completes a level or a positive action. This legacy method only displays the prompt once.
tryShowingReviewWithLimit({required SmartReviewConditions conditions, int maxPromptCount = 3, int minDaysBetweenPrompts = 14, int minOpensBetweenPrompts = 10}) Future<void>
Call this method when you want to check conditions and possibly show the review, allowing it to be shown multiple times up to maxPromptCount.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance SmartReviewPrompter
final