Skip to content

Text in Hero red when animating #30647

@Hannnes1

Description

@Hannnes1

Steps to Reproduce

  1. Create an app with two pages
  2. Add a button to route to the second page
  3. Add a Hero widget with a Text widget as its child on both pages and give them the same tag

Logs

flutter run -v

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.17763.379], locale sv-SE)
    • Flutter version 1.2.1 at E:\Programs\flutter
    • Framework revision 8661d8aecd (7 weeks ago), 2019-02-14 19:19:53 -0800
    • Engine revision 3757390fa4
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at E:\Programs\Android
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = E:\Programs\Android
    • Java binary at: E:\Programs\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.3)
    • Android Studio at E:\Programs\Android Studio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[√] Connected device (1 available)
    • ONEPLUS A5010 • 25d040ad • android-arm64 • Android 9 (API 28)

• No issues found!

flutter analyze

Analyzing test_app...
No issues found! (ran in 2.6s)

When I add a Hero animation to a Text widget the text becomes red with a yellow underline during the animation. The problem goes away if you add another widget between the Hero and Text widgets, but then the text becomes duplicated instead, as shown in this Stackoverflow thread.

A gif of the issue:
Imgur

Metadata

Metadata

Assignees

No one assigned

    Labels

    f: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions