Skip to content

Add ListTile margin property#1205

Merged
bdlukaa merged 6 commits intobdlukaa:masterfrom
jacksonb-cs:add-list-tile-margin-property
Apr 16, 2025
Merged

Add ListTile margin property#1205
bdlukaa merged 6 commits intobdlukaa:masterfrom
jacksonb-cs:add-list-tile-margin-property

Conversation

@jacksonb-cs
Copy link
Contributor

@jacksonb-cs jacksonb-cs commented Apr 8, 2025

Added ListTile.decorationMargin parameter.
Added kDefaultListTileDecorationMargin constant.
Closes #1204.

  • I have updated CHANGELOG.md with my changes
  • I have run "dart format ." on the project
  • I have added/updated relevant documentation

@jacksonb-cs jacksonb-cs changed the title Add ListTile margin property (#1204) Add ListTile margin property Apr 8, 2025
Copy link
Collaborator

@WinXaito WinXaito left a comment

Choose a reason for hiding this comment

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

LGTM, maybe I would name the property margin instead of decorationMargin, but let @bdlukaa say what he think.

@WinXaito WinXaito requested a review from bdlukaa April 15, 2025 06:46
Copy link
Owner

@bdlukaa bdlukaa left a comment

Choose a reason for hiding this comment

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

Can you merge from master?

Also, add the margin parameter to debugFillProperties.

/// Padding applied between this tile's [FocusBorder] and outer decoration.
///
/// Defaults to [kDefaultListTileMargin].
final EdgeInsetsGeometry? margin;
Copy link
Owner

Choose a reason for hiding this comment

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

Why is it nullable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If no margin padding is desired, null is the most concise way to express that (as opposed to EdgeInsets.all(0).

@jacksonb-cs jacksonb-cs requested a review from bdlukaa April 16, 2025 14:41
@bdlukaa bdlukaa merged commit cc7dd22 into bdlukaa:master Apr 16, 2025
1 of 3 checks passed
@jacksonb-cs jacksonb-cs deleted the add-list-tile-margin-property branch April 16, 2025 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to customize ListTile's built-in container margin

3 participants