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
Support custom ExpansionPanel icon #108973
Comments
If this is worked on, I would like to also be able to adjust the positioning of the icon in the Row. Currently, it is centered in the row, and I would like an option to adjust that alignment to the start (e.g. top). My header, when expanded has several lines of descriptive text in the header, and if the icon is centered vertically, I think it looks awkward. Ideally, allowing for a leading/trailing widget to be passed in, and this widget expands to the height of the header should give us complete control over the icons and their alignment. |
Hey @masus04 , I might try to add this feature, I think separating the collapsed icon and expanded icon is not necesary, it uses an icon and rotates the icon with a Tween. |
Giving support to change the icon tile height is also fairly important. Right now it's too rigid |
Please, give us ability to remove that icon. What if i want to make this icon with the same background as in my header? |
For now, you can check this answer on stackoverflow for a temporary solution |
@danagbemava-nc there is this closed PR that tried to implement the function years ago: Any chances of this being merged? |
this issue is also a duplicate of #32802 |
There is also another PR that tried to create this: #35416 |
It was closed because it wasn't completed, as it says in the comments there; there is no chance of a PR that's neither complete nor reviewed being merged. Anyone interested in making a new, complete PR is certainly welcome to do so. |
found this one #121957 |
@stuartmorgan any chances of helping me with the failing tests on this one? |
also control the width of the content part vs the part where the icon is. |
This issue is missing a priority label. Please set a priority label when adding the |
This issue is being addressed by #130462 |
Use case
ExpansionPanel
should allow the user to customize or even remove the trailing expansion icon/button. This is even more needed as thecanTapOnHeader
key allows expanding elements by clicking on the header instead of the icon.ExpansionPanelList
in combination withExpansionPanel
s are currently the only canonical option to build a list of expandable tiles. Out of the two, onlyExpansionPanel
can be expanded and collapsed programmatically, and therefore onlyExpansionPanel
is able to enforce that only one element is expanded at any given time, collapsing any other element when a new one is expanded. However, whileExpansionTile
does not force the expansion icon,ExpansionPanel
does.It seems like quite a common use case to want a List of expandable elements but not show a fixed style expand button, either because the button should be customizable or be replaced with a clickable heading.
Proposal
Add the following keys to
ExpansionPanel
:The expand/collapse icons should replace the currently hardcoded arrow icons or in case they are null, not display any expand/collapse buttons.
The
ExpandIconPosition
andCollapseIconPosition
should control where the expand/collapse button is located.The text was updated successfully, but these errors were encountered: