smart_review_dialog 0.0.1
smart_review_dialog: ^0.0.1 copied to clipboard
Intelligent 2-step in-app review dialog for Flutter with sentiment routing, store review redirect, internal feedback capture, and frequency capping.
smart_review_dialog #
An intelligent, 2-step sentiment rating funnel for Flutter that protects public App Store and Google Play ratings while intercepting user dissatisfaction before it hurts your reputation.
π Overview & Hook #
Asking every user to review your app blindly on public stores often invites 1-star ratings from upset users and hurts your algorithmic visibility.
smart_review_dialog solves this with an intelligent sentiment routing funnel:
- Step 1 (Internal Sentiment Check): Presents a clean, delightful rating prompt (stars, mood emojis, or thumbs).
- Step 2A (Positive Sentiment - 4 or 5 stars): Celebrates with a colorful particle confetti explosion and immediately guides happy users to leave a 5-star public store review.
- Step 2B (Critical Sentiment - 1 to 3 stars): Seamlessly diverts upset users into a private internal feedback form (with issue description and optional contact email), preserving your store rating while capturing valuable bug reports and product critiques.
β¨ Features #
- π‘οΈ 2-Step Reputation Shield: Automatically filters positive vs. critical sentiment with configurable rating thresholds.
- π Celebratory Confetti Engine: Built-in lightweight particle physics burst upon high ratings with zero external dependencies.
- π± Store Review Routing: Directs positive reviewers to App Store / Google Play review prompts with custom redirect triggers.
- π Graceful Negative Interception: Captures text feedback and optional follow-up email directly in-app.
- β±οΈ Smart Frequency Capping: Throttles dialog prompts by minimum days, key action thresholds, or permanent opt-out once rated.
- π¨ Multiple Rating Styles: Choose between interactive animated Stars, Mood Emojis (π‘ to π€©), or Thumbs Up/Down.
- π Modern Design & Theming: Supports frosted glass backdrop blur (
BackdropFilter), dark theme preset, rounded corners, and custom styling.
π Installation #
Add the dependency to your pubspec.yaml:
flutter pub add smart_review_dialog
Or manually:
dependencies:
smart_review_dialog: ^0.0.1
Then import:
import 'package:smart_review_dialog/smart_review_dialog.dart';
β‘ Quick Start #
Trigger the smart review dialog in under 15 lines of code:
SmartReviewDialog.show(
context,
onPositiveRating: (rating) {
// Trigger in_app_review or launch store URL
},
onFeedbackSubmitted: (rating, feedback, email) {
// Send feedback to your backend API or Slack webhook
},
);
π Advanced Usage & Examples #
1. Mood Emojis with Custom Theming #
SmartReviewDialog.show(
context,
ratingStyle: RatingStyle.emojis,
theme: const SmartReviewTheme(
promptTitle: 'How is your mood today?',
promptSubtitle: 'Pick the emoji that best reflects your experience.',
primaryColor: Color(0xFF10B981),
),
onPositiveRating: (rating) => print('Positive: $rating'),
onFeedbackSubmitted: (rating, feedback, email) => print('Feedback: $feedback'),
);
2. Frequency Capping with Persistent Storage #
final frequencyManager = FrequencyManager(
storage: MySharedPreferencesStorage(), // implements ReviewStorageDelegate
rules: const ReviewFrequencyRules(
minDaysBetweenPrompts: 14,
minActionCount: 3,
neverAskAgainIfRated: true,
),
);
// Call this on a critical app action (e.g., booking complete, order delivered):
await frequencyManager.recordAction();
if (await frequencyManager.shouldShowDialog()) {
await frequencyManager.recordPromptShown();
SmartReviewDialog.show(
context,
onPositiveRating: (_) => frequencyManager.recordRatingCompleted(),
onFeedbackSubmitted: (_, __, ___) => frequencyManager.recordRatingCompleted(),
);
}
π οΈ Properties Table #
| Property | Type | Default | Description |
|---|---|---|---|
sentimentConfig |
SentimentConfig |
SentimentConfig(positiveThreshold: 4) |
Threshold determining positive vs. critical sentiment routing. |
theme |
SmartReviewTheme |
SmartReviewTheme() |
Visual colors, titles, padding, backdrop blur, and text configurations. |
ratingStyle |
RatingStyle |
RatingStyle.stars |
Visual rating representation (stars, emojis, thumbs). |
customRatingBuilder |
Widget Function(...) |
null |
Optional custom builder for fully customized rating selectors. |
onPositiveRating |
ValueChanged<int>? |
null |
Invoked when the user picks a rating $\ge$ threshold. |
onStoreRedirect |
VoidCallback? |
null |
Invoked when the user taps the public store button in step 2A. |
onFeedbackSubmitted |
Function(int, String, String?)? |
null |
Invoked when the user submits private feedback in step 2B. |
onDismissed |
VoidCallback? |
null |
Invoked when the dialog is dismissed or rejected. |
barrierDismissible |
bool |
true |
Whether tapping outside the dialog closes the modal. |
π¬ Preview & Demo #
+-------------------------------------------------------------+
| [ smart_review_dialog ] |
| |
| Step 1: In-App Rating Step 2A: 5-Star Confetti |
| +-----------------------+ +-----------------------+ |
| | Enjoying our App? | | π Thank You! π | |
| | β β β β β | -> | [ Rate on Store ] | |
| | [Maybe Later] | | [Maybe Later] | |
| +-----------------------+ +-----------------------+ |
| |
| Step 2B: Internal Feedback |
| +-----------------------+ |
| | Help Us Improve π¬ | |
| | [Describe issue...] | |
| | [Send Feedback] | |
| +-----------------------+ |
+-------------------------------------------------------------+
π€ Contributing #
Contributions, issues, and feature requests are welcome! Feel free to open an issue or pull request on GitHub.
π License #
This project is licensed under the MIT License - see the LICENSE file for details.
π¨βπ» Author #
Developed with β€οΈ by Shahzain Baloch (BalochCodes).