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

Can't change native IOS text #115

Closed devsuhaib closed 2 years ago

devsuhaib commented 2 years ago

I'm trying to add custom text to the alert message box on IOS but I always get the default text on IOS using the native alert.

RateMyApp rateMyApp = RateMyApp(
  preferencesPrefix: 'rateMyApp_',
  minDays: 2
  minLaunches: 5,
  remindDays: 5,
  remindLaunches: 10,
);

 WidgetsBinding.instance?.addPostFrameCallback((_) async {
      await rateMyApp.init().then((_) => {
            if (rateMyApp.shouldOpenDialog)
              {
                rateMyApp.showRateDialog(
                  context,
                  title: 'تقييم التطبيق',
                  message:
                      'نرجوا تقييم تطبيق', 
                  rateButton: 'تقييم', 
                  noButton: 'لا شكرآ', 
                  laterButton: 'لاحقا', 
                  ignoreNativeDialog:
                      Platform.isAndroid,
                  dialogStyle: const DialogStyle(
                      messageAlign: TextAlign.center), 

                  onDismissed: () => rateMyApp.callEvent(RateMyAppEventType
                      .laterButtonPressed), 
                )
              }
          });
    });
Skyost commented 2 years ago

You have to pass ignoreNativeDialog to true.