Flutter: How to add App Rating in your flutter app

Mobile app development has become very lucrative in the last 10 years, with over 2.7 billion smartphone users across the world, and over a million software engineers whose specialty lies in developing mobile apps, whether Android or IOS.
However, there is no doubt that the mobile app industry is thriving, this has resulted in high competitiveness between app vendors seeking to win the heart of users. The need to avail users with better features such as app friendliness, experience, user engagement, and many more, sums up to how valuable your app is or will become.
Moreso, as of March 2020 google’s play store has recorded about 2.8 million apps while apple’s app store records about 1.8 million apps. These, of course, are numbers pretty high for anyone willing to dabble into mobile app business to ignore. With these record numbers, both app stores have developed an algorithm to keep users focused on apps that matter and get rid of irrelevant apps. This algorithm is what I and maybe others may call a Rating system.
Rating systems
This is a simple review form provided by play store and AppStore on its platform for users of a specific app to leave reviews, ratings and give answers to surveys.

Above is an example of a rating system created by the Playstore. The creators of this app can as well respond to the review and further improve their product.
Rating System in my flutter app.
So my guess is that you're a flutter developer and you already know what flutter is and how useful it is in developing dual-platform(ios and android) applications.
We will be making use of a flutter plugin called rate_my_app head over to pub.dev/packages/rate_my_app to get any other information you might need as I’ll only show you how to install and basic usage.
Installation
add this to your pubspec.yaml file
rate_my_app: ^0.6.0+2
Then run
flutter pub get
now import the package into your project like this
import ‘package:rate_my_app/rate_my_app.dart’;
Now instantiate the package like this:
RateMyApp _rateMyApp = RateMyApp (
preferencesPrefix: 'rateMyApp_pro',
minDays: 3,
minLaunches: 7,
remindDays: 2,
remindLaunches: 5
);preferencesPrefix: // this is stored in session to enable the package, recognize if the user already rated the app.minDays: // this is set as minimum days the user would have downloaded and used the app before rating the appminLaunches: //this is set as minimum launches the user would have made before rating the appremindDays: //so if the user does not rate the app when the rating dialog box appears, this is set to remind the user every 2 days until he/she rates the appremindLaunches: //also if the user does not rate the app when the rating dialog box appears, this is set to remind the user every 5 times he/she launches the app until he/she rates the app.
Now we initialize the package by doing this:
When you run this it checks if the user has already left their rating, if not it pops the rating dialog box. If the user rating is greater than 4, you can redirect the user to your app on play store or AppStore to leave a review, else if their rating is poor, you can redirect them to a page in your app to tell you how you can make the app better. This is so you can keep only the best rating on your app page, which can be helpful in getting more users to download your app and keeping your app visible and healthy.
With this little information, I hope I’ve made your day, thanks for reading, I and can be reached on Twitter and via email samuelezedi@gmail.com.
Stay safe.