Skip to content

feat: add ListTile.tileGradient#1328

Open
jacksonb-cs wants to merge 4 commits into
bdlukaa:masterfrom
jacksonb-cs:add-list-tile-gradient-arg
Open

feat: add ListTile.tileGradient#1328
jacksonb-cs wants to merge 4 commits into
bdlukaa:masterfrom
jacksonb-cs:add-list-tile-gradient-arg

Conversation

@jacksonb-cs

@jacksonb-cs jacksonb-cs commented May 26, 2026

Copy link
Copy Markdown
Contributor

Add the ability to provide a gradient to ListTile.

Pre-launch Checklist

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

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

Copy link
Copy Markdown
Contributor

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 introduces a tileGradient property to ListTile and ListTile.selectable to support gradient backgrounds. It also updates the internal container decoration to apply this gradient. The reviewer feedback suggests ensuring the mutual exclusivity assertion for tileColor and tileGradient is applied consistently across constructors, and recommends removing the unnecessary late keyword from local variables in the builder to leverage compile-time definite assignment analysis.

Comment thread lib/src/controls/surfaces/list_tile.dart
Comment thread lib/src/controls/surfaces/list_tile.dart Outdated
@bdlukaa

bdlukaa commented May 26, 2026

Copy link
Copy Markdown
Owner

Instead of a gradient, what about allowing a Decoration object? Like Container.color and Container.decoration. It'll give more flexibility and avoid adding a new parameter for each decoration parameter needed.

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.

2 participants