I have a list tile and it initially looks like this:
What I want is that when I click on it, it expands and show more information like below:
So is there any widget for this or do I have to do it manually?
I have a list tile and it initially looks like this:
What I want is that when I click on it, it expands and show more information like below:
So is there any widget for this or do I have to do it manually?
Yea You can achieve this by using package Expandable widget Try this you will get your requirement.
just use ExpansionTile
which natively supported by flutter, official documentation.
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:[]);
},
)