checkForRatingPop method
Check for In-app Ratings. @params context @param isFeedbackEnabled bool - Set to true to activate the "Send Feedback" option.
Implementation
Future<void> checkForRatingPop(BuildContext context, {bool isFeedbackEnabled = false}) async {
int? criteriaId =
await AppticsFlutterPlatform.instance.checkForRatingPop();
if (criteriaId == null || criteriaId == 0 || !context.mounted) return;
updateRatingShown();
Future.delayed(
Duration.zero,
() => _showAlertDialog(
context, "Rate Our App", "Do you enjoy using this app?",
isFeedbackEnabled: isFeedbackEnabled, onClickOpenStore: () {
openPlayStore();
sentStats(criteriaId, PopupAction.RATE_IN_STORE_CLICKED);
}, onClickSendFeedback: () {
openFeedback();
sentStats(criteriaId, PopupAction.SEND_FEEDBACK_CLICKED);
}, onClickLater: () {
sentStats(criteriaId, PopupAction.LATER_CLICKED);
}));
}