[WIP] Android 10 transition by default#51538
[WIP] Android 10 transition by default#51538shihaohong wants to merge 3 commits intoflutter:masterfrom shihaohong:default-andr-10
Conversation
|
This change causes some internal tests to fail. At a glance, it doesn't look like it will be easy to fix and figure out. I may have to delay this a bit since this would add quite a bit of work for me and I'm already working through a few other breaking changes. |
|
Since we have landed a new transition, can we try again with tests? |
|
|
||
| expect(widget1Scale.scale.value, greaterThan(1.0)); | ||
| expect(widget2Scale.scale.value, lessThan(1.0)); | ||
| expect(widget2Opacity.opacity.value, lessThan(1.0)); |
There was a problem hiding this comment.
I tried to migrate these tests, and it fails at here, with the actual value 1.0 .
The following TestFailure object was thrown running a test:
Expected: a value less than <1.0>
Actual: <1.0>
Which: is not a value less than <1.0>
I'm wondering why it would be 1.0 after only 50 milliseconds, that doesn't seem correct.
There was a problem hiding this comment.
I'm not exactly sure why either and would have to look at your code. Do you have a branch with the attempted migration you can link me to?
There was a problem hiding this comment.
Do you have a branch with the attempted migration you can link me to?
Not yet. Should I file a PR for this?
There was a problem hiding this comment.
The main issue I ran into originally was that it resulted in breaking changes internally at Google and I did not really know what the sources of the issue were. I would hold off on trying to get the Android 10 transition by default since it would require a Googler to fix the internal tests/implementations if we want to move forward.
There was a problem hiding this comment.
I would hold off on trying to get the Android 10 transition by default since it would require a Googler to fix the internal tests/implementations if we want to move forward.
Because those tests/implementations are invisible to me, the only I can do is reach out to you.
If it re-opened at the future, please let me know. :)
There was a problem hiding this comment.
Or should we try again to see if it breaks them?
There was a problem hiding this comment.
I'm pretty sure it will continue to break the tests. I remember that they were mostly tests that rely strictly on the widgets contained in the existing default Android transition.
|
I'm going to close this out for now because I haven't been able to work on it and I don't want to keep this PR open and stale. |
|
I'll bring up a new PR for this, if you think it's the right time to push forward. |
Description
As new OEM behaviors are created, we should be staying up to date. This PR introduces a breaking change that sets the default MaterialPageRoute transition to the Android 10 transition.
To keep previous behavior, one would need to modify the PageTransitionsTheme in their MaterialApp theme as follows:
Related Issues
Fixes #43277
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?