I want to deploy some info with DropDownButton
in flutter.
I only want to show 3 different DropDownButton
in a vertical column of my screen. And inside of every DropDownButton
, I want to show a horizontal Column with 2 cells.
The left side shows a QR image, and the right side shows info about that QR, such as the description of that item.
How can I do something similar to that idea?
this is my code:
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.grey[850],
appBar: AppBar(
title: Text(
"This all the QR",
style: TextStyle(
fontSize: 16.0, /*fontWeight: FontWeight.bold*/
),
),
centerTitle: true,
),
body: Container(
padding: EdgeInsets.symmetric(
horizontal: 8,
),
child: Column(
children: [
//here i want to show 3 DropdownButtons, and deploy the info inside it.
child: DropdownButton(),
child: DropdownButton(),
child: DropdownButton(),
]
I want to achieve something like this
2
Answers
try this and change this code as you want
The behaviour you are looking for belongs to an expansion tile. Drop-down has got a different functionality. Please check this link
https://api.flutter.dev/flutter/material/ExpansionTile-class.html