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

Skip to content

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

Merged
merged 8 commits into from
Jul 13, 2022

Conversation

TahaTesser
Copy link
Member

@TahaTesser TahaTesser commented Jul 5, 2022

context: #102310

closes #105760
related #106955

This PR updated ListTile Material explanation and adds it to other ListTile based widgets such as CheckboxListTile, RadioListTile, and SwitchListTile
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

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Jul 5, 2022
@TahaTesser TahaTesser requested review from HansMuller and Piinks July 5, 2022 11:50
@TahaTesser
Copy link
Member Author

cc: @Piinks
This is part of the work left from #102310

Copy link
Contributor

@Piinks Piinks left a 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!

@TahaTesser TahaTesser requested a review from Piinks July 8, 2022 14:42
@HansMuller HansMuller removed their request for review July 8, 2022 17:41
/// [CheckboxListTile] itself but by the [Material] widget ancestor.
/// In this case, one can wrap a [Material] widget around the [CheckboxListTile],
/// e.g.:
///
Copy link
Contributor

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.

Suggested change
///
///
/// {@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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

And here

@TahaTesser TahaTesser requested a review from Piinks July 8, 2022 19:48
Copy link
Contributor

@Piinks Piinks left a 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.

@TahaTesser TahaTesser requested a review from Piinks July 12, 2022 07:38
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

LGTM!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 13, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App 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.

Update docs and add examples for cases when ListTile needs to be wrapped with Material
2 participants