smart_in_app_review 1.0.2 copy "smart_in_app_review: ^1.0.2" to clipboard
smart_in_app_review: ^1.0.2 copied to clipboard

Advanced In App Reviews for iOS and Android. Shows review dialogs only after meeting defined conditions with smart timing.

Smart In-App Review #

Pub Version Flutter License

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.

🌟 Features #

  • 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

πŸš€ Why Smart In-App Review? #

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:

  1. Waiting for the right moment: Only prompting satisfied users
  2. Respecting user experience: Never interrupting important tasks
  3. Learning from usage: Tracking meaningful engagement metrics
  4. Following best practices: Implementing platform-specific guidelines

πŸ“± Platform Support #

Platform Support Native API
Android βœ… Play In-App Review
iOS βœ… SKStoreReviewController

Requirements #

  • Android: API level 21+ (Android 5.0+) with Google Play Store
  • iOS: iOS 10.3+
  • Flutter: 3.22.0+
  • Dart: 3.9.0+

πŸ›  Installation #

Add this to your pubspec.yaml:

dependencies:
  smart_in_app_review: ^1.0.0

Then run:

flutter pub get

Android Setup #

Add 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'
}

πŸ“– Usage #

Basic Setup #

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
}

Advanced Configuration #

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();

Manual Triggering #

// 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'),
);

βš™οΈ Configuration Options #

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 -

πŸ§ͺ Testing #

Debug Mode #

Enable debug mode to see detailed logs and bypass timing conditions:

SmartInAppReview()
    .setDebugMode(true)
    .monitor();

Force Show #

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'),
);

Reset Data #

Clear all stored data for fresh testing:

await SmartInAppReview().reset();

πŸ“Š Best Practices #

βœ… Do's #

  • 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'ts #

  • 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

Quick Entertainment Apps

SmartInAppReview()
    .setMinLaunchTimes(2)
    .setMinDaysAfterInstall(1)
    .setMinSessionDuration(1)
    .monitor();

Productivity Apps

SmartInAppReview()
    .setMinLaunchTimes(5)
    .setMinDaysAfterInstall(7)
    .setMinSessionDuration(10)
    .setMinDaysBeforeRemind(30)
    .monitor();

Gaming Apps

SmartInAppReview()
    .setMinLaunchTimes(3)
    .setMinDaysAfterInstall(2)
    .setMinSessionDuration(5)
    .monitor();

πŸ” API Reference #

Methods #

Configuration Methods

  • setMinLaunchTimes(int launchTimes) β†’ SmartInAppReview
  • setMinDaysAfterInstall(int days) β†’ SmartInAppReview
  • setMinDaysBeforeRemind(int days) β†’ SmartInAppReview
  • setMinSecondsBeforeShowDialog(int seconds) β†’ SmartInAppReview
  • setMinSessionDuration(int minutes) β†’ SmartInAppReview
  • setDebugMode(bool enabled) β†’ SmartInAppReview

Control Methods

  • monitor() β†’ void - Start monitoring conditions
  • canShow() β†’ Future<bool> - Check if conditions are met
  • forceShow() β†’ Future<bool> - Force show review dialog
  • reset() β†’ Future<void> - Reset all stored data

Static Methods

  • SmartInAppReview.platformVersion β†’ Future<String?> - Get platform version

πŸ› Troubleshooting #

Review Dialog Not Showing #

  1. Check platform requirements (Android 5.0+, iOS 10.3+)
  2. Verify Google Play Store is installed (Android)
  3. Review not available in debug mode (Android limitation)
  4. Enable debug mode to see condition status
  5. Use canShow() method to check conditions

Debug Information #

SmartInAppReview smartReview = SmartInAppReview()
    .setDebugMode(true);

bool canShow = await smartReview.canShow();
print('Can show review: $canShow');

// Check individual conditions in logs

πŸ“„ Platform Notes #

Android #

  • 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

iOS #

  • System limits frequency of review prompts
  • User can disable review prompts in Settings
  • Testing works in debug mode

🀝 Contributing #

Contributions are welcome! Please read our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

πŸ“ License #

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments #


Made with ❀️ for the Flutter community_review

A new Flutter plugin project.

Getting Started #

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.

2
likes
150
points
45
downloads

Publisher

unverified uploader

Weekly Downloads

Advanced In App Reviews for iOS and Android. Shows review dialogs only after meeting defined conditions with smart timing.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, in_app_review, plugin_platform_interface, shared_preferences

More

Packages that depend on smart_in_app_review

Packages that implement smart_in_app_review