Repository navigation
Hero Widget transitionOnUserGestures animates wrong. #32356
Copy link
Copy link
Closed
Labels
a: animationAnimation APIsAnimation APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packages
Description
Steps to Reproduce
- Run this main.dart file
https://gist.github.com/skabber/8dbf7cdee1431b13d8b87d8ff9075fa3
When a Hero widget with transitionOnUserGestures set to true navigates back using the gesture, the animation shrinks too small and closes out entirely before it's final state.
I would expect the animation to only go as small as the final resting place.

Logs
$ flutter analyze
Analyzing flutter_hero_bug...
No issues found! (ran in 2.3s
$ flutter analyze
Analyzing flutter_hero_bug...
No issues found! (ran in 2.3s)
Skabber:flutter_hero_bug me$ flutter doctor -v
[✓] Flutter (Channel beta, v1.5.4-hotfix.2, on Mac OS X 10.14.4 18E226, locale en-US)
• Flutter version 1.5.4-hotfix.2 at /Users/me/Projects/flutter
• Framework revision 7a4c33425d (9 days ago), 2019-04-29 11:05:24 -0700
• Engine revision 52c7a1e849
• Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/me/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/me/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.6.1
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[✓] VS Code (version 1.33.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.0.0
[✓] Connected device (1 available)
• iPhone Xʀ • EB6A28D4-E1A4-466E-B6FE-2CAC5A9C9222 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2
(simulator)
• No issues found!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: animationAnimation APIsAnimation APIsframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packagescupertino_ui package in flutter/packages
Activity
dnfield commentedon May 9, 2019
/cc @HansMuller @goderbauer @xster who might have some insight here.
skabber commentedon May 9, 2019
@LongCatIsLooong Switching to master has the same issue.
LongCatIsLooong commentedon May 9, 2019
Yeah sorry I didn't realize it only happens when you navigate back using gesture.
LongCatIsLooong commentedon May 10, 2019
OK this happens on asset images too.
TickerModeis stoppingImagefrom reading the image data from file.@skabber thank you for reporting this! If this is a real world issue you're facing, try specifying both the height and the width for the
Container.skabber commentedon May 13, 2019
Thanks @LongCatIsLooong
Adding the height in does correctly work around the issue.
LongCatIsLooong commentedon Jun 14, 2019
with #32842 merged this should be fixed on master now.
github-actions commentedon Aug 29, 2021
This 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.