Skip to content

IntrinsicHeight works incorrectly with Images #117079

@QuasiStellar

Description

@QuasiStellar

IntrinsicHeight fails to calculate its height in various cases (i.e. when Text is present #87571), but this issue is about Images.

UPD: the following example is broken, check this one instead: #117079 (comment)
Code snippet:
https://dartpad.dev/?id=41c3233072b062e4f754f253c4326da7

Code above produces a Row of a VerticalDivider and a Column that contains some 1-line Texts and an Image. You can tell by the visible height of the VerticalDivider the resulting height of the Row isn't right:
image
Now change the line 40 from this
width: 100,
to this
height: 100,
and it corrects itself:

image

Seems like Images report their original height to IntrinsicHeight without considering that it could've changed due to custom width parameter. Changing its height pareameter, however, does the trick.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: imagesLoading, displaying, rendering imagesfound in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions