Created
May 3, 2020 06:49
-
-
Save alandsilva26/c578dfe7708e5364eb64a9221166fcb9 to your computer and use it in GitHub Desktop.
Code for expansion panel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return ExpansionPanelList( | |
| expansionCallback: (int index, bool isExpanded) { | |
| setState(() { | |
| isExpanded1 = !isExpanded; | |
| }); | |
| }, | |
| children: gridTiles.map<ExpansionPanel>((tile) { | |
| return ExpansionPanel( | |
| body: Text("test body"), | |
| headerBuilder: (BuildContext context, bool isExpanded) { | |
| return ListTile( | |
| leading: Icon(Icons.title), | |
| title: Text("test"), | |
| onTap: () => print("Test"), | |
| ); | |
| }, | |
| canTapOnHeader: true, | |
| isExpanded: isExpanded1, | |
| ); | |
| }).toList(), | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment