-
Notifications
You must be signed in to change notification settings - Fork 29.2k
fix(ListTileTheme): isThreeLine is missing. #165481
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
Conversation
I know that SwitchListTile, CheckboxListTile, and RadioListTile have not yet received unified settings from ListTileThemeData. However, I think this could be added as a follow-up to this PR. |
Could you take some time to review this request? cc @TahaTesser |
Unfortunately, I'm quite occupied for a few months. This PR will be reviewed soon by the team during triage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I like how the test cases are written!
); | ||
} | ||
|
||
void testTowLine() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void testTowLine() { | |
void testTwoLine() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we rename them to expectTwoLine
and expectThreeLine
? Fits English grammar better imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your suggestion was great. Thank you—I’ve already made the changes.
Would you mind helping me request a second review? I really appreciate it! cc @dkwingsmt |
Of course not! I forgot about it since I was a bit busy today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits 👍 . Thanks for the thorough tests.
@@ -482,7 +482,7 @@ class ListTile extends StatelessWidget { | |||
/// | |||
/// When using a [Text] widget for [title] and [subtitle], you can enforce | |||
/// line limits using [Text.maxLines]. | |||
final bool isThreeLine; | |||
final bool? isThreeLine; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a sentence to the docs about what happens if this is null?
@@ -139,6 +140,9 @@ class ListTileThemeData with Diagnosticable { | |||
/// or [ExpansionTile.controlAffinity] or [SwitchListTile.controlAffinity] or [RadioListTile.controlAffinity]. | |||
final ListTileControlAffinity? controlAffinity; | |||
|
|||
/// If specified, overrides the default value of [ListTile.isThreeLine] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Period at the end here.
buildFrame(themeDataIsThreeLine: false, themeIsThreeLine: false, isThreeLine: true), | ||
); | ||
expectThreeLine(); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for covering all the different combinations in the test 👍
Thank you all. I believe this PR is ready. If you have time, could you please help add a commit label? Much appreciated. @dkwingsmt @justinmc |
…hrough the theme. (#166826) This PR is a continuation of [165481](#165481) Related items also include: [SwitchListTile](#166820), [RadioListTile](#166964) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…gh the (#166964) This PR is a continuation of [165481](#165481) Related items also include: [SwitchListTile](#166820), [CheckboxListTile](#166826) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…ough the theme. (#166820) This PR is a continuation of [165481](#165481) Related items also include: [RadioListTile](#166964), [CheckboxListTile](#166826) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…gh the (flutter#166964) This PR is a continuation of [165481](flutter#165481) Related items also include: [SwitchListTile](flutter#166820), [CheckboxListTile](flutter#166826) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. --------- Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
…ough the theme. (flutter#166820) This PR is a continuation of [165481](flutter#165481) Related items also include: [RadioListTile](flutter#166964), [CheckboxListTile](flutter#166826) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
fix: flutter#165453 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
…hrough the theme. (flutter#166826) This PR is a continuation of [165481](flutter#165481) Related items also include: [SwitchListTile](flutter#166820), [RadioListTile](flutter#166964) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
fix: #165453
Pre-launch Checklist
///
).