Repository navigation
[Animations] SharedAxisTransition children have improper layout during transition when children are of different size #54585
Description
Activity
- addedhas reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onp: animationsThe animations packageThe animations package
on Apr 13, 2020 - Reacted by Shi-Hao Hong
As discussed in flutter/packages#170 (comment), one strategy to approach this issue is to expose a
layoutBuilderparameter that provides developers full control over the widget's layout, much like the Flutter framework's AnimatedSwitcher.Persists with
animations: ^1.1.2, current master1.21.0-6.0.pre.117flutter doctor -v
[✓] Flutter (Channel master, 1.21.0-6.0.pre.117, on Mac OS X 10.15.6 19G73, locale en-GB) • Flutter version 1.21.0-6.0.pre.117 at /Users/nevercode/dev/flutter • Framework revision 7ec2d360bc (2 hours ago), 2020-07-29 23:25:38 -0700 • Engine revision a9910e409c • Dart version 2.10.0 (build 2.10.0-1.0.dev 24c7666def) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at /Users/nevercode/Library/Android/sdk • Platform android-29, build-tools 29.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 11.6) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 11.6, Build version 11E708 • CocoaPods version 1.9.1 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.0) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 47.1.2 • Dart plugin version 193.7361 • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) [✓] VS Code (version 1.47.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.12.2 [✓] Connected device (6 available) • Redmi Note 7 (mobile) • 6345c469 • android-arm64 • Android 9 (API 28) • Nevercode’s iPhone (mobile) • b668e524315069f3db3661ac11ff1f66afafebdb • ios • iOS 13.6 • iPhone 11 Pro Max (mobile) • 55C8466B-5367-492B-8EFE-EC45D980571F • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator) • macOS (desktop) • macos • darwin-x64 • Mac OS X 10.15.6 19G73 • Web Server (web) • web-server • web-javascript • Flutter Tools • Chrome (web) • chrome • web-javascript • Google Chrome 84.0.4147.105 • No issues found!- addedfound in release: 1.21Found to occur in 1.21Found to occur in 1.21
on Jul 30, 2020 - added a commit that references this issue
on Aug 17, 2020 Is there any workaround for this problem ? I'm having it everytime I use PageTransitionSwitcher
EDIT: The only way I've found for now is to create a CustomPageTransitionSwitcher which takes as a new argument a Alignment, which is then used in the Stack widget.
Reacted by Shi-Hao Hong and RobinLabicheThis should be fixed with flutter/packages#170, which allows for custom layouts for
PageTransitionSwitcher's children.Reacted by Bryson Thill, Vignes Aruljothi and Steven SpielThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked as resolved and limited conversation to collaborators
on Aug 13, 2021 - addedpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
on Jul 5, 2023
Steps to Reproduce
The following should reproduce the problem:
animations 1.0.0+5
Expected results:

Expected the correct layout for next child when transitioning between widgets
Actual results:
Logs