RateMyApp class

Allows to kindly ask users to rate your app if custom conditions are met (eg. install time, number of launches, etc...).

Constructors

RateMyApp.new({String preferencesPrefix = 'rateMyApp_', int? minDays, int? remindDays, int? minLaunches, int? remindLaunches, String? googlePlayIdentifier, String? appStoreIdentifier})
Creates a new Rate my app instance.
RateMyApp.customConditions({String preferencesPrefix = 'rateMyApp_', String? googlePlayIdentifier, String? appStoreIdentifier, required List<Condition> conditions})
Creates a new Rate my app instance with custom conditions.
const

Properties

appStoreIdentifier String?
The app store identifier.
final
conditions List<Condition>
All conditions that should be met to show the dialog.
final
googlePlayIdentifier String?
The google play identifier.
final
hashCode int
The hash code for this object.
no setterinherited
isNativeReviewDialogSupported Future<bool?>
Returns whether native review dialog is supported.
no setter
preferencesPrefix String
Prefix for preferences.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shouldOpenDialog bool
Whether the dialog should be opened.
no setter
storeIdentifier String?
Returns the corresponding store identifier.
no setter

Methods

buildAnimations({required Animation<double> animation, required Widget child, required DialogTransition dialogTransition}) Widget
Builds the animations widget.
callEvent(RateMyAppEventType eventType) Future<void>
Calls the specified event.
init() Future<void>
Initializes the plugin (loads base launch date, app launches and whether the dialog should not be opened again).
launchNativeReviewDialog() Future<void>
Launches the native review dialog. You should check for isNativeReviewDialogSupported before running the method.
launchStore() Future<LaunchStoreResult>
Launches the corresponding store.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
populateWithDefaultConditions({int? minDays, int? remindDays, int? minLaunches, int? remindLaunches}) → void
Adds the default conditions to the current conditions list.
reset() Future<void>
Resets the plugin data.
save() Future<void>
Saves the plugin current data to the shared preferences.
showRateDialog(BuildContext context, {String title = 'Rate this app', String message = 'If you like this app, please take a little bit of your time to review it !\nIt really helps us and it shouldn\'t take you more than one minute.', DialogContentBuilder? contentBuilder, DialogActionsBuilder? actionsBuilder, String rateButton = 'Rate', String noButton = 'No thanks', String laterButton = 'Maybe later', RateMyAppDialogButtonClickListener? listener, bool ignoreNativeDialog = false, DialogStyle dialogStyle = const DialogStyle(), VoidCallback? onDismissed, bool barrierDismissible = true, String barrierLabel = '', DialogTransition dialogTransition = const DialogTransition()}) Future<void>
Shows the rate dialog.
showStarRateDialog(BuildContext context, {String title = 'Rate this app', String message = 'You like this app ? Then take a little bit of your time to leave a rating :', DialogContentBuilder? contentBuilder, StarDialogActionsBuilder? actionsBuilder, bool ignoreNativeDialog = false, DialogStyle dialogStyle = const DialogStyle(titleAlign: TextAlign.center, messageAlign: TextAlign.center, messagePadding: EdgeInsets.only(bottom: 20)), StarRatingOptions starRatingOptions = const StarRatingOptions(), VoidCallback? onDismissed, bool barrierDismissible = true, String barrierLabel = '', DialogTransition dialogTransition = const DialogTransition()}) Future<void>
Shows the star rate dialog.
toString() String
A string representation of this object.
inherited

Operators

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