0

I have a list tile and it initially looks like this:

enter image description here

What I want is that when I click on it, it expands and show more information like below:

enter image description here

So is there any widget for this or do I have to do it manually?

dipansh
  • 331
  • 3
  • 15

3 Answers3

0

Yea You can achieve this by using package Expandable widget Try this you will get your requirement.

Amit Singh
  • 675
  • 6
  • 15
0

just use ExpansionTile which natively supported by flutter, official documentation.

Ruchit
  • 2,137
  • 1
  • 9
  • 24
0

Expanded Group is something that can help you easily: https://pub.dev/packages/expandable_group

-> Use expansion Tile
ExpansionTile(
          title: Text('ExpansionTile 1'),
          subtitle: Text('Trailing expansion arrow icon'),
          children: <Widget>[
            ListTile(title: Text('This is tile number 1')),
          ],
        ),

->Create ListView with Divider
ListView.separated(
  itemCount: count,
  itemBuilder: (context, index) {
    return ListTile(
      title: Text('$index Title'),
    );
  },
  separatorBuilder: (context, index) {
    return Column(children:[]);
  },
 )
Ruchit
  • 2,137
  • 1
  • 9
  • 24
ashutosh
  • 103
  • 9