-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Refactor: migrate fade upwards page transition builder to widgets #175560
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
Refactor: migrate fade upwards page transition builder to widgets #175560
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly refactors FadeUpwardsPageTransitionsBuilder by moving it from the material library to the widgets library, which includes moving the associated class implementation and tests. This is a good structural improvement. My review includes one suggestion to complete the task outlined in the associated issue, which is to also deprecate the FadeUpwardsPageTransitionsBuilder as it is now considered obsolete.
| class FadeUpwardsPageTransitionsBuilder extends PageTransitionsBuilder { | ||
| /// Constructs a page transition animation that slides the page up. | ||
| const FadeUpwardsPageTransitionsBuilder(); | ||
|
|
||
| @override | ||
| Widget buildTransitions<T>( | ||
| PageRoute<T>? route, | ||
| BuildContext? context, | ||
| Animation<double> animation, | ||
| Animation<double>? secondaryAnimation, | ||
| Widget child, | ||
| ) { | ||
| return _FadeUpwardsPageTransition(routeAnimation: animation, child: child); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The associated issue (#142929) mentions that FadeUpwardsPageTransitionsBuilder should be deprecated as it's no longer a default transition on any platform. I've added a suggestion to apply the @Deprecated annotation to the class. Please replace vX.Y.Z with the appropriate version.
@Deprecated(
'This page transition is obsolete and is no longer the default on any platform. '
'Consider using a more current transition, such as [OpenUpwardsPageTransitionsBuilder] or [ZoomPageTransitionsBuilder]. '
'This feature was deprecated after vX.Y.Z.'
)
class FadeUpwardsPageTransitionsBuilder extends PageTransitionsBuilder {
/// Constructs a page transition animation that slides the page up.
const FadeUpwardsPageTransitionsBuilder();
@override
Widget buildTransitions<T>(
PageRoute<T>? route,
BuildContext? context,
Animation<double> animation,
Animation<double>? secondaryAnimation,
Widget child,
) {
return _FadeUpwardsPageTransition(routeAnimation: animation, child: child);
}
}
victorsanni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good so far.
2c5f2ed to
c10107b
Compare
packages/flutter/test/widgets/page_transitions_builder_test.dart
Outdated
Show resolved
Hide resolved
c10107b to
1bcc744
Compare
victorsanni
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some more comments.
packages/flutter/test/widgets/page_transitions_builder_test.dart
Outdated
Show resolved
Hide resolved
1bcc744 to
9c87ac1
Compare
MitchellGoodwin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as well!
9c87ac1 to
e148a09
Compare
|
autosubmit label was removed for flutter/flutter/175560, because - The status or check suite Mac_arm64 build_tests_4_4 has failed. Please fix the issues identified (or deflake) before re-applying this label. |
…10244) Manual roll requested by [email protected] flutter/flutter@7cd821c...a873a27 2025-10-16 [email protected] [tool] makes listing a shader also as an asset a build failure (flutter/flutter#176866) 2025-10-16 [email protected] Roll Packages from d062181 to 835dccb (7 revisions) (flutter/flutter#177100) 2025-10-16 [email protected] Handle the new location of Perfetto in create_updated_flutter_deps.py (flutter/flutter#177099) 2025-10-16 [email protected] Implement dialog windows for the win32 platform (flutter/flutter#176309) 2025-10-16 [email protected] `SelectableRegion` should not show flutter rendered context menu when web context menu is enabled (flutter/flutter#176855) 2025-10-16 [email protected] Manual roll Skia to 2d9df7c70b6f (flutter/flutter#177074) 2025-10-16 [email protected] feat: add `OptionsViewOpenDirection.mostSpace` to `RawAutocomplete` (flutter/flutter#172997) 2025-10-16 [email protected] [Android] Refactor `ImageReaderSurfaceProducer` restoration after app resumes (flutter/flutter#175937) 2025-10-15 [email protected] Refactor: migrate fade upwards page transition builder to widgets (flutter/flutter#175560) 2025-10-15 [email protected] Marks Windows windowing_test to be unflaky (flutter/flutter#176701) 2025-10-15 [email protected] fix: 🐛 Add equality and hashCode implementations to ScrollAwareImageProvider (flutter/flutter#175038) 2025-10-15 [email protected] Updates `sliver_tree.1.dart` to use `MediaQuery.widthOf(context)` (flutter/flutter#176888) 2025-10-15 [email protected] [web] Fix focus issues in newer versions of Chrome (flutter/flutter#176938) 2025-10-15 [email protected] [Android 16] Update `android_engine_vulkan_tests` to Test Against SDK 36 Emulator (flutter/flutter#176985) 2025-10-15 [email protected] Fix key events interception by RadioGroup when no Radio is focused. (flutter/flutter#176335) 2025-10-15 [email protected] Update cherry-pick instructions to include instructions for pre-release CPs (flutter/flutter#177020) 2025-10-15 [email protected] Manual roll Skia to c501c727a007 (flutter/flutter#177015) 2025-10-15 [email protected] Update examples to latest Linux runner style (flutter/flutter#177033) 2025-10-15 [email protected] [material/menu_anchor.dart] Create internal menu controller if external controller is changed to null. (flutter/flutter#176375) 2025-10-15 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fix - TalkBack does not announce list information (#174374)" (flutter/flutter#177062) 2025-10-14 [email protected] Implement Regular Windows for Linux (flutter/flutter#176187) 2025-10-14 [email protected] Fix - TalkBack does not announce list information (flutter/flutter#174374) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…utter#175560) Changes: * Move FadeUpwardsPageTransitionsBuilder from `material/page_transitions_theme.dart` to `widget/page_transitions_builder.dart` part of: flutter#172929 ## 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.
Changes:
material/page_transitions_theme.darttowidget/page_transitions_builder.dartpart of: #172929
Pre-launch Checklist
///).