-
Notifications
You must be signed in to change notification settings - Fork 29.7k
WIP on predictive back gestures on Android #153635
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
Conversation
b7eacf5 to
fab9709
Compare
fab9709 to
b7eacf5
Compare
b7eacf5 to
3ac8da5
Compare
|
To replicate the native back gesture animation, both the front and the back page need to have access to the One solution could be to change Another one could be to make the I just started glancing at how those classes interact with each other, but it seems to me that It's documentation states that it's "The dispatcher for opening and closing pages of an application" and it's already responsible for the I'll try moving the reception of |
|
I left a comment on the issue (#153577 (comment)) about what the transition should look like. Let's leave this PR open until @maRci002 or I pick up the work of making it look like that transition. I'm sure any future work will take inspiration from this, so thank you for the work on this PR.
Are you talking about WidgetsBinding.handlePopRoute versus WidgetsBinding._handleStartBackGesture etc.? |
|
I tried this out locally and it does look pretty close to the correct Shared Element transition! |
|
(PR Triage): Hey @justinmc is this still on your radar to adopt in the future? |
|
@PaulGrandperrin Are you still around and able to fix the merge conflicts? I'm planning to try to update the animation this quarter by taking a look at this PR and #154718. |
|
Hey @PaulGrandperrin thanks for sending this PR, @justinmc has now picked up #153577 to resolve. I am going to close this PR, but really appreciate your contributions here. Thanks! |
This is a minimal effort patch that I'm using to fix some of the issues I had with the back gesture animation described in: #153577
This fixes:
This doesn't fix:
The patch is very low effort, and I'm a newbie with flutter. It's the first time I write animation code..
I know I'm supposed to use
Tweens, but I'm not used to them and I just wrote what was most intuitive for me, ATM.My animation algorithm is very ugly, but there would need deeper breaking changes to
route.dartto be fixed correctly.All this to say that this PR is not supposed to be merged. I hope it could be useful to someone to willing to contribute a better PR to the codebase, but that would need a lot deeper changes to adapt the design to how the back gestures work on Android, which is very different from iOS.
Actually, maybe I'll propose better code in the future if I feel like spending more time on this.