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
273 stars 111 forks source link

Allow editing of the dialog #143

Closed AnasElbattra closed 8 months ago

AnasElbattra commented 8 months ago

Is your feature request related to a problem? Please describe. I need to customize the UI for the rate dialog but it is impossible

Describe the solution you'd like 1- I need to change the color of each button separately 2- I need a bool variable if it's true the action button will wrap with the Wrap widget with some edits in the Wrap widget like spacing and alignment 3- add an icon in the dialog

Skyost commented 8 months ago

Use both contentBuilder and actionsBuilder arguments of showRateDialog() or just display your custom dialog 🙂

AnasElbattra commented 8 months ago

Use both contentBuilder and actionsBuilder arguments of showRateDialog() or just display your custom dialog 🙂

@Skyost , How can I use the function for the three button when I use actionsBuilder

Skyost commented 8 months ago

It works like every other builder in Flutter, except that you have to return a list of widgets (TextButtons for instance). See the default implementation : https://github.com/Skyost/RateMyApp/blob/master/lib/src/dialogs.dart#L96.

AnasElbattra commented 8 months ago

It works like every other builder in Flutter, except that you have to return a list of widgets (TextButtons for instance). See the default implementation : https://github.com/Skyost/RateMyApp/blob/master/lib/src/dialogs.dart#L96.

@Skyost Nice, I need example to implement these (rate-later-no) correctly when I press on the button

Skyost commented 8 months ago

Just extend the base classes (RateMyAppLaterButton for example) and override the build method to return your custom widget. You'll then be able to use onButtonClicked directly from your widget.

AnasElbattra commented 8 months ago

Thank you for your help