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
Added ExpansionTileController #123298
Added ExpansionTileController #123298
Conversation
7b30765
to
228135d
Compare
c67964f
to
0d1c991
Compare
This PR doesn't include something comparable to |
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! Thank you!
I will add ExpansionTileController.of(context).
Did you want to do that in this PR or in a separate one?
0d1c991
to
f308b66
Compare
I've added ExpansionController.of,maybeOf to this PR. Should be ready for review. |
/// to provide a new scope with a [BuildContext] that is "under" the | ||
/// [ExpansionTile]: | ||
/// | ||
/// ** See code in examples/api/lib/material/expansion_tile/expansion_tile.of.1.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.
This is the same sample back to back, is that intended?
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.
Please pull from remote before adding ore commits. I fixed typos before and now to try to be helpful.
0f5fc20
to
aa49bff
Compare
/// to provide a new scope with a [BuildContext] that is "under" the | ||
/// [ExpansionTile]: | ||
/// | ||
/// ** See code in examples/api/lib/material/expansion_tile/expansion_tile.1.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.
This is still the same sample back to back, is this intended?
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.
Yes. The sample covers both topics.
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.
Would it make more sense to have it shown once, and discuss the two cases together? Otherwise when you read the first one, half of the code has no context, and then when you read it again the second time it appears, it makes full sense.
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 see what you mean, yes. Merged the doc.
aa49bff
to
8505e5b
Compare
what about list of ExpansionTile? How to pass different controllers n control expand close for every tile |
Supports programmatically expanding or collapsing an ExpansionTile.
Most of the work for this PR was completed by @xvrh in #107038.
Fixes #60387
Here's an example: