Reputation: 3680
I've build a list of expansion panel and I find it annoying that you have to press the arrow to expand it. Intuitively, you want to expand the panel when you click anywhere on the header (feedback from testers).
Is there a way to do it ? I don't see any properties and the header builder only allows a widget as parameter.
Upvotes: 5
Views: 1442
Reputation: 10101
If you are using the ExpansionPanelRadio
then it has a parameter called canTapOnHeader
, make it to true
.
Like below:
ExpansionPanelRadio(
value: item.id,
canTapOnHeader: true,
headerBuilder: (BuildContext context, bool isExpanded) {
...
},
body: ...,
);
Upvotes: 6