A smart Flutter plugin that intelligently prompts users for app reviews at the optimal time, leading to higher quality reviews and better app store ratings.
- Smart Timing: Only shows review prompts when multiple conditions are met
- Highly Configurable: Customize all timing parameters to fit your app
- Session Awareness: Tracks user session duration for better timing
- Debug Support: Built-in debug mode for testing
- Cross-Platform: Works on both iOS and Android
- Modern Architecture: Built with latest Flutter and Dart standards
- Zero Interruption: Never interrupts critical user flows
The average user only writes a review when something is wrong with your app, leading to unfairly negative ratings. Smart In-App Review solves this by:
- Waiting for the right moment: Only prompting satisfied users
- Respecting user experience: Never interrupting important tasks
- Learning from usage: Tracking meaningful engagement metrics
- Following best practices: Implementing platform-specific guidelines
| Platform | Support | Native API |
|---|---|---|
| Android | ✅ | Play In-App Review |
| iOS | ✅ | SKStoreReviewController |
- Android: API level 21+ (Android 5.0+) with Google Play Store
- iOS: iOS 10.3+
- Flutter: 3.22.0+
- Dart: 3.9.0+
Add this to your pubspec.yaml:
dependencies:
smart_in_app_review: ^1.0.0Then run:
flutter pub getAdd the following to your app's android/app/build.gradle:
dependencies {
implementation 'com.google.android.play:review:2.0.1'
implementation 'com.google.android.play:review-ktx:2.0.1'
}import 'package:smart_in_app_review/smart_in_app_review.dart';
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
// Simple one-line setup with smart defaults
SmartInAppReview()
.setMinLaunchTimes(3)
.setMinDaysAfterInstall(2)
.setMinDaysBeforeRemind(7)
.setMinSessionDuration(2)
.monitor();
}
// ... rest of your app
}SmartInAppReview smartReview = SmartInAppReview();
// Configure all parameters
smartReview
.setMinLaunchTimes(5) // Wait for 5 app launches
.setMinDaysAfterInstall(3) // Wait 3 days after installation
.setMinDaysBeforeRemind(14) // Wait 14 days between prompts
.setMinSecondsBeforeShowDialog(3) // Delay 3 seconds before showing
.setMinSessionDuration(5) // Require 5+ minutes in session
.setDebugMode(false) // Disable debug mode
.monitor();
// Check if conditions are met
bool canShow = await smartReview.canShow();
// Force show for testing
await smartReview.forceShow();
// Reset all data
await smartReview.reset();// For premium features, achievements, or positive interactions
void onUserAccomplishment() async {
SmartInAppReview smartReview = SmartInAppReview();
if (await smartReview.canShow()) {
// Conditions are met, will show after configured delay
}
}
// Force show (bypasses all conditions)
ElevatedButton(
onPressed: () => SmartInAppReview().forceShow(),
child: Text('Rate App'),
);| Method | Description | Default | Range |
|---|---|---|---|
setMinLaunchTimes(int) |
Minimum app launches required | 3 | 1-100 |
setMinDaysAfterInstall(int) |
Days to wait after installation | 3 | 0-365 |
setMinDaysBeforeRemind(int) |
Days between review prompts | 7 | 1-365 |
setMinSecondsBeforeShowDialog(int) |
Delay before showing dialog | 2 | 0-60 |
setMinSessionDuration(int) |
Required session length (minutes) | 2 | 0-60 |
setDebugMode(bool) |
Enable debug logging | false | - |
Enable debug mode to see detailed logs and bypass timing conditions:
SmartInAppReview()
.setDebugMode(true)
.monitor();Use forceShow() to test the review dialog immediately:
// In a test button
ElevatedButton(
onPressed: () async {
bool shown = await SmartInAppReview().forceShow();
print('Review dialog shown: $shown');
},
child: Text('Test Review'),
);Clear all stored data for fresh testing:
await SmartInAppReview().reset();- Configure based on your app's usage patterns
- Test thoroughly with debug mode
- Prompt after positive user interactions
- Respect the user's choice (don't spam)
- Use longer delays for productivity apps
- Don't show immediately on app launch
- Don't interrupt critical user flows
- Don't show after errors or crashes
- Don't ask too frequently
- Don't bypass platform guidelines
SmartInAppReview()
.setMinLaunchTimes(2)
.setMinDaysAfterInstall(1)
.setMinSessionDuration(1)
.monitor();SmartInAppReview()
.setMinLaunchTimes(5)
.setMinDaysAfterInstall(7)
.setMinSessionDuration(10)
.setMinDaysBeforeRemind(30)
.monitor();SmartInAppReview()
.setMinLaunchTimes(3)
.setMinDaysAfterInstall(2)
.setMinSessionDuration(5)
.monitor();setMinLaunchTimes(int launchTimes)→SmartInAppReviewsetMinDaysAfterInstall(int days)→SmartInAppReviewsetMinDaysBeforeRemind(int days)→SmartInAppReviewsetMinSecondsBeforeShowDialog(int seconds)→SmartInAppReviewsetMinSessionDuration(int minutes)→SmartInAppReviewsetDebugMode(bool enabled)→SmartInAppReview
monitor()→void- Start monitoring conditionscanShow()→Future<bool>- Check if conditions are metforceShow()→Future<bool>- Force show review dialogreset()→Future<void>- Reset all stored data
SmartInAppReview.platformVersion→Future<String?>- Get platform version
- Check platform requirements (Android 5.0+, iOS 10.3+)
- Verify Google Play Store is installed (Android)
- Review not available in debug mode (Android limitation)
- Enable debug mode to see condition status
- Use
canShow()method to check conditions
SmartInAppReview smartReview = SmartInAppReview()
.setDebugMode(true);
bool canShow = await smartReview.canShow();
print('Can show review: $canShow');
// Check individual conditions in logs- Review dialogs may not appear in debug builds
- Google Play Store must be installed
- System decides whether to show the dialog
- Testing requires release builds or internal testing
- System limits frequency of review prompts
- User can disable review prompts in Settings
- Testing works in debug mode
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by advanced_in_app_review
- Built on in_app_review
- Uses shared_preferences
Made with ❤️ for the Flutter community_review
A new Flutter plugin project.
This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.