Update ExpansionPanel example for the updated expansionCallback callback (#132837)
fixes [ExpansionPanelList can't expand/collapse on the latest stable/master ](https://github.com/flutter/flutter/issues/132759) https://github.com/flutter/flutter/pull/128082 updated the `expansionCallback` and also the `ExpansionPanel` sample in the Flutter gallery but not the API example. This PR fixes the API example and adds tests.
This commit is contained in:
@@ -67,7 +67,7 @@ class _ExpansionPanelListExampleState extends State<ExpansionPanelListExample> {
|
||||
return ExpansionPanelList(
|
||||
expansionCallback: (int index, bool isExpanded) {
|
||||
setState(() {
|
||||
_data[index].isExpanded = !isExpanded;
|
||||
_data[index].isExpanded = isExpanded;
|
||||
});
|
||||
},
|
||||
children: _data.map<ExpansionPanel>((Item item) {
|
||||
|
||||
Reference in New Issue
Block a user