fix a bug when android uses CupertinoPageTransitionsBuilder.#99919
fix a bug when android uses CupertinoPageTransitionsBuilder.#99919ipcjs wants to merge 4 commits intoflutter:masterfrom
Conversation
chunhtai
left a comment
There was a problem hiding this comment.
Do you have a reproducible code that demonstrate the crash
| ) { | ||
| TargetPlatform platform = Theme.of(context).platform; | ||
|
|
||
| if (CupertinoRouteTransitionMixin.isPopGestureInProgress(route)) |
There was a problem hiding this comment.
It seems like a weird way to override the platform. It may create unexpected behavior
There was a problem hiding this comment.
It's probably a legacy code.
So i deleted it😅
Maybe i'm mistaken, the console is not reporting any error. |
|
It looks like the removed code was there to handle a corner case I agree that code looks like a hack, but the solution in this PR should still handle this corner case |
| /// or [FadeUpwardsPageTransitionsBuilder]. | ||
| /// | ||
| /// [MaterialPageRoute.buildTransitions] delegates to this method. | ||
| Widget buildTransitions<T>( |
There was a problem hiding this comment.
The change makes sense to me. but it would be a breaking change. cc @HansMuller who may have better idea on how to fix this issue.
HansMuller
left a comment
There was a problem hiding this comment.
I'm afraid that this seems like a bit of a hack. I appreciate that it solves the reported problem. On the other hand it doesn't generalize and it appears to break the existing public API. Do we need a generic way to indicate that a page transition animation should not be recreated when route.navigator.userGestureInProgress is true?
5c98e2d to
a02fbf3
Compare
|
Sorry, I shouldn't have merged the master branch...😵 |
|
back gesture while OS changes is a very edge case and almost impossible to occur in actual code. Special handling of it doesn't feel too problematic. As for BREAK CHANGE, |
|
I don't think we want to pursue this PR (see #99919 (review)) so I'm going to close it. Thanks for the contribution. |
When android uses iOS style `PageTransitionsBuilder` and iOS uses android style `PageTransitionsBuilder`, on android, swipe from the left edge of the screen doesn't work. This PR solves that problem. #99919 introduced a breaking change, the pr re-implemented it <del>without introducing a breaking change.**</del>
When android uses iOS style
PageTransitionsBuilderand iOS uses android stylePageTransitionsBuilder, on android, swipe from the left edge of the screen doesn't work. This PR solves that problem.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.