Skip to content

Hero Widget transitionOnUserGestures animates wrong. #32356

Closed

Description

@skabber

Steps to Reproduce

  1. 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.
appVideo

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!

Activity

  1. added
    p: cupertino_uicupertino_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    on May 9, 2019
  2. dnfield commented on May 9, 2019

    @dnfield
    Contributor

    /cc @HansMuller @goderbauer @xster who might have some insight here.

  3. skabber commented on May 9, 2019

    @skabber
    Author

    @LongCatIsLooong Switching to master has the same issue.

  4. LongCatIsLooong commented on May 9, 2019

    @LongCatIsLooong
    Contributor

    @LongCatIsLooong Switching to master has the same issue.

    Yeah sorry I didn't realize it only happens when you navigate back using gesture.

  5. LongCatIsLooong commented on May 10, 2019

    @LongCatIsLooong
    Contributor

    OK this happens on asset images too. TickerMode is stopping Image from 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.

  6. skabber commented on May 13, 2019

    @skabber
    Author

    Thanks @LongCatIsLooong
    Adding the height in does correctly work around the issue.

  7. LongCatIsLooong commented on Jun 14, 2019

    @LongCatIsLooong
    Contributor

    with #32842 merged this should be fixed on master now.

  8. github-actions commented on Aug 29, 2021

    @github-actions

    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 -v and a minimal reproduction of the issue.

  9. locked as resolved and limited conversation to collaborators on Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

a: animationAnimation APIsframeworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packages

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions