Please tell me how to implement the drop down list. Only not the usual list that appears above the blocks, but I need the table to move away on the click of a button and all the lower elements also move down to the desired distance. I found similar widgets like ExpansionPanelList
, but I don't know if it's realistic to implement this, or maybe you are familiar with similar widgets that can implement such an action. I will be grateful for help.
I need this table to pop up.
Table _blockDetails(blocksInfoData) {
return Table(
border: TableBorder.all(color: Colors.grey.shade400),
children: [
TableRow(decoration: BoxDecoration(color: Colors.grey[200]), children: [
const Padding(
padding: EdgeInsets.all(15),
child: Text(
'Size',
style: TextStyle(fontWeight: FontWeight.bold),
)),
Padding(
padding: const EdgeInsets.all(15),
child: Text('${blocksInfoData.size}')),
]),
TableRow(decoration: BoxDecoration(color: Colors.grey[200]), children: [
const Padding(
padding: EdgeInsets.all(15),
child:
Text('Nonce', style: TextStyle(fontWeight: FontWeight.bold))),
Padding(
padding: const EdgeInsets.all(15),
child: Text('${blocksInfoData.nonce}')),
]),
],
);
}
That's how it is here
You could use the Visibility widget witch will allow you to show or hide widgets, so you can wrap your button with the visibility widget and make a bool value and set it to true or false depends on your choice, and use the onPressed of the button and set the bool value to true or false. This will allow you to show the details when you want to in this case when you press the button. If the answer helps pls let me know. Visibility widget >> https://api.flutter.dev/flutter/widgets/Visibility-class.html