Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add minTileHeight to ListTileTheme #159053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

AhmedLSayed9
Copy link
Contributor

@AhmedLSayed9 AhmedLSayed9 commented Nov 17, 2024

minTileHeight was added by #145244 to ListTile widget so its height can be customized to less than the default height.

This PR supports setting minTileHeight at the ListTileTheme too.

Pre-launch Checklist

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Nov 17, 2024
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

Copy link
Contributor

@nate-thegrate nate-thegrate left a comment

Choose a reason for hiding this comment

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

Just a heads-up: minTileHeight has already been added to the ListTile theme data.

/// Overrides the default value of [ListTile.minTileHeight].
final double? minTileHeight;


The previous PR added this property to ListTileThemeData without adding an obsolete property to ListTileTheme.

@Piinks
Copy link
Contributor

Piinks commented Nov 19, 2024

This might be covered by #91772 where we are normalizing component themes to use *ThemeData, and I think @nate-thegrate has already pointed out this is included there.

@Piinks Piinks requested a review from QuncCccccc November 19, 2024 19:10
@QuncCccccc
Copy link
Contributor

Hello! The minTileHeight has been added to ListTileTHemeData. Using

ListTileTheme(
  data: ListTileThemeData(
    minTileHeight: xxx
  )
)

would be encouraged since this pattern follows Flutter widget theme convention:)

@AhmedLSayed9
Copy link
Contributor Author

Hello! The minTileHeight has been added to ListTileTHemeData. Using

ListTileTheme(
  data: ListTileThemeData(
    minTileHeight: xxx
  )
)

would be encouraged since this pattern follows Flutter widget theme convention:)

I see. This PR just adds an obsolete property to ListTileTheme that can be used directly. I guess this is no longer needed for new properties :)

@QuncCccccc
Copy link
Contributor

We should not use these properties in ListTileTheme directly and the existing properties, except ListTileTheme.data, would be deprecated in the future. Would you mind if we close this PR for now:)? And you are right, if we have new theme properties to customize ListTile, we should add the new ones to ListTileThemeData instead of ListTileTheme.

@Piinks
Copy link
Contributor

Piinks commented Dec 4, 2024

Thanks for sending a PR for this @AhmedLSayed9, I am going to close this PR based on the above comments. Please use ListTileThemeData.minTileHeight. Thanks!

@Piinks Piinks closed this Dec 4, 2024
@AhmedLSayed9 AhmedLSayed9 deleted the tileheight branch December 4, 2024 20:17
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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants