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

Added support for custom transitions #102

Closed Sadeesha-Sath closed 3 years ago

Sadeesha-Sath commented 3 years ago

Hi, I'm the one who opened the issue yesterday. I went ahead and coded the custom transition support by myself. Please review it and merge.

Fixes #100

I changed the core.dart showDialog functions to showGeneralDialog functions. Also, I used an enum to give users a way to implement transitions easily. The enums contain some basic transitions and users can change them using some properties. When a user does not specify any transitions, it defaults to using the showDialog() function. This way the current users won't feel any difference in transitions.

Furthermore, it has support to add user custom transition builders.

@Skyost

Skyost commented 3 years ago

Seems a very good feature to me. Don't you think it would be better to put transitions related parameters in a separated class / in the DialogStyle class @Sadeesha-Sath ?

Sadeesha-Sath commented 3 years ago

Yeah I get what you are saying, we can declare a global transition with that kind of approach. It's a good idea, however, I think we should also give the ability to declare it in the showRateDialog function too. That way we can declare different transitions for different implementations. Like the default rate dialog to appear from middle and the explicit star rate dialog to scale from the appbar or something. @Skyost

Skyost commented 3 years ago

You're right @Sadeesha-Sath. So I'll merge this PR (and decide later if I add something like that or not).

Sadeesha-Sath commented 3 years ago

Yeah, I was working on something like that too. I'll put another PR when I'm done. @Skyost

Thanks for quick response too.

Skyost commented 3 years ago

@Sadeesha-Sath That's great, thanks a lot. Actually, I'm a bit slow to answer because I'm very busy for the moment. But it should get better in the next days.