-
Notifications
You must be signed in to change notification settings - Fork 28.6k
Update ListTile
and ListTile
based widget docs for Material usage
#107104
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
Update ListTile
and ListTile
based widget docs for Material usage
#107104
Conversation
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.
This will be super helpful! Thank you!
/// [CheckboxListTile] itself but by the [Material] widget ancestor. | ||
/// In this case, one can wrap a [Material] widget around the [CheckboxListTile], | ||
/// e.g.: | ||
/// |
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.
I missed this last time, apologies. This should be wrapped in a snippet
so it is subject to analysis. That way of we change the code, this will get updated.
/// | |
/// | |
/// {@tool snippet} |
/// [RadioListTile] itself but by the [Material] widget ancestor. In this | ||
/// case, one can wrap a [Material] widget around the [RadioListTile], e.g.: | ||
/// | ||
/// ```dart |
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.
And ehre
/// [SwitchListTile] itself but by the [Material] widget ancestor. In this | ||
/// case, one can wrap a [Material] widget around the [SwitchListTile], e.g.: | ||
/// | ||
/// ```dart |
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.
And here
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.
Ah it looks like turning those into snippets did find some analysis errors! :)
Check the analyzer failure. I noticed some of them are related to undefined variables. To handle these ones, look in the codebase for // Examples can assume:
That defines variables for snippets like these.
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!
40f09f2
to
5341615
Compare
context: #102310
closes #105760
related #106955
This PR updated
ListTile
Material explanation and adds it to other ListTile based widgets such asCheckboxListTile
,RadioListTile
, andSwitchListTile
Instead of turning the ListTile doc explanation into the template, I'm reusing the
ListTile
doc with modifications along with a suitable code snippet.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.