mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
![]() This PR is to add a new page transition for Material 3. The new builder matches the latest Android page transition behavior; while the new page slides in from right to left, it fades in at the same time and the old page slides out from right to left, fading out at the same time. When both pages are fading in/out, the black background might show up, so I added a `ColoredBox` for the slides-out page whose color defaults to `ColorScheme.surface`. The `backgroundColor` property can be used to customize the default transition color. This demo shows the forward and backward behaviors. https://github.com/user-attachments/assets/a806f25d-8564-4cad-8dfc-eb4585294181 Fixes: https://github.com/flutter/flutter/issues/142352 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. |
||
---|---|---|
.. | ||
hero.0.dart | ||
hero.1.dart |