Closed theahmadjawad closed 2 years ago
@theahmadjawad make sure you call .init(); before checking for shouldOpenDialog.
Exactly @srihari9n !
I have the same error, even call init()
_rateMyApp.init().then((_) { if(_rateMyApp.shouldOpenDialog) { _rateMyApp.showRateDialog( ...
Are you sure your app doesn't make any call to Rate my app before that init()
call ?
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(... `
Great !
Unhandled Exception: LateInitializationError: Field 'minimumDate' has not been initialized.
I am getting this error when checking shouldOpenDialog.