I am new to flutter and I want to make a list of cards like this.
I tried to Understand the original Project but I am not able to figure out.
I just
Here is an example of what I said in the comments on your question:
It contains a Card with a Container which contains a height, the height is updated when the Card is tapped because of the InkWell's onTap event, the onTap calls the setState() function to update the widgets, with the new height of the Card.
class MyApp extends StatefulWidget {
double oldheight = 100.0;
double newheight = 200.0;
double height = 200.0;
@override
Widget build(BuildContext context) {
final title = 'Basic List';
return MaterialApp(
title: title,
home: Scaffold(
appBar: AppBar(
title: Text(title),
),
body: ListView(
children: [
InkWell(
onTap: () {
setState(() {
if (height == oldheight) {
height = newheight;
}
else{
height = oldheight;
}
});
},
child: Card(
child:Container(height: height,),
),
),
],
),
),
);
}
This isn't tested yet...