Skip to content

Conversation

@RamonFarizel
Copy link
Contributor

computeMinIntrinsicHeight was not taking into consideration the vertical padding.

Fix: #179377

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Dec 5, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes an issue in ListTile where computeMinIntrinsicHeight did not account for vertical padding. The change correctly adds this padding. A regression test is also included to prevent this issue from recurring. My review includes suggestions to simplify the implementation in list_tile.dart for better readability and to clean up unused parameters in the new test file.

RamonFarizel and others added 3 commits December 6, 2025 06:36
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! Thank you for contributing! 💙

final double titleMinHeight = title.getMinIntrinsicHeight(width);
final double? subtitleMinHeight = subtitle?.getMinIntrinsicHeight(width);

const topAndBottomPaddingMultiplier = 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I don't know that this variable needs to be defined, it seems obvious to me that padding will need to be applied both above and below the title + subtitle block.

@victorsanni
Copy link
Contributor

Took a look at the google testing failures, there were two failures. One seemed trivial to me, just a slight leading icon vertical position change. The other one was a little less so, it wrapped a ListTile inside a SingleChildScrollView inside an IntrinsicHeight. Before this PR the ListTile scrolled but with this PR it is fully extended. Both changes LGTM.

@RamonFarizel
Copy link
Contributor Author

I just wanted to confirm, but does it require any action on my side?

Took a look at the google testing failures, there were two failures. One seemed trivial to me, just a slight leading icon vertical position change. The other one was a little less so, it wrapped a ListTile inside a SingleChildScrollView inside an IntrinsicHeight. Before this PR the ListTile scrolled but with this PR it is fully extended. Both changes LGTM.

@victorsanni victorsanni moved this from In Progress to Done in Google Testing Queue Dec 16, 2025
@victorsanni victorsanni added the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Dec 16, 2025
Merged via the queue into flutter:master with commit 6a9328b Dec 16, 2025
71 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Dec 16, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

Development

Successfully merging this pull request may close these issues.

ListTile intrinsic height incorrectly returns minTileHeight instead of actual content height

3 participants