Skyost / RateMyApp

This plugin allows to kindly ask users to rate your app if custom conditions are met (eg. install time, number of launches, etc...).
https://pub.dev/packages/rate_my_app
MIT License
265 stars 106 forks source link

Bug minimumDate #124

Closed theahmadjawad closed 2 years ago

theahmadjawad commented 2 years ago

Unhandled Exception: LateInitializationError: Field 'minimumDate' has not been initialized.

I am getting this error when checking shouldOpenDialog.

srihari9n commented 2 years ago

@theahmadjawad make sure you call .init(); before checking for shouldOpenDialog.

Skyost commented 2 years ago

Exactly @srihari9n !

frevostudios commented 11 months ago

I have the same error, even call init()

_rateMyApp.init().then((_) { if(_rateMyApp.shouldOpenDialog) { _rateMyApp.showRateDialog( ...

Skyost commented 11 months ago

Are you sure your app doesn't make any call to Rate my app before that init() call ?

frevostudios commented 11 months ago

I didn't reproduce this bug again. Maybe I was testing with a wrong version, maybe calling to rate before init(). So, I'm thinking that was my mistake.

I'm monitoring if this error happens again. This is the code that I'm using now:

`RateMyApp rateMyApp = RateMyApp( preferencesPrefix: 'rateMyApp', minDays: 1, minLaunches: 2, remindDays: 3, remindLaunches: 3, googlePlayIdentifier: ConstantsConfig.playStoreId );

rateMyApp.init().then(() { if(_rateMyApp.shouldOpenDialog) { AppLog.printLog('ReviewInAppUtils.rateApp - show'); _rateMyApp.showRateDialog(... `

Skyost commented 11 months ago

Great !