Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for custom transitions #102

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

Sadeesha-Sath
Copy link
Contributor

@Sadeesha-Sath Sadeesha-Sath commented Jun 23, 2021

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 Skyost self-assigned this Jul 3, 2021
@Skyost
Copy link
Owner

Skyost commented Jul 3, 2021

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
Copy link
Contributor Author

Sadeesha-Sath commented Jul 3, 2021

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
Copy link
Owner

Skyost commented Jul 5, 2021

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

@Skyost Skyost merged commit a048bc4 into Skyost:master Jul 5, 2021
@Sadeesha-Sath
Copy link
Contributor Author

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
Copy link
Owner

Skyost commented Jul 5, 2021

@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.

@Sadeesha-Sath Sadeesha-Sath deleted the add-custom-transitions branch July 6, 2021 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add custom transitions to dialogs
2 participants