onEventOccurred method
Triggered when an even occurs in the plugin lifecycle. Return true to save the shared preferences, false otherwise.
Implementation
@override
bool onEventOccurred(RateMyAppEventType eventType) {
if (eventType == RateMyAppEventType.initialized) {
launches++;
return true;
}
if (eventType == RateMyAppEventType.laterButtonPressed || eventType == RateMyAppEventType.requestReview) {
launches -= remindLaunches;
return true;
}
return false;
}