Reputation: 280
I want to add Card into column in my app. I have added card into a container. code given below
body: Container(
padding: EdgeInsets.fromLTRB(0, 5, 0, 0),
height: 183,
child: Card(
elevation: 5,
shadowColor: Colors.blue,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
child: Column(.....),
), //card
), //Container
Please tell me how to add card into column
Upvotes: 0
Views: 55
Reputation: 1
The best solution of your problem is use List in your app to show CardView in vertical form.
ListView.builder(scrollDirection: Axis.vertical,
itemCount: 10,
itemBuilder:(context, position) {
return Card (
Child: Text("Hello Flutter"))}
)
This is code for you problem.
Upvotes: 0
Reputation: 1466
Adding Card in a column
Column(
children: const <Widget>[
Card(), //card1
Card(), //card2
])
Upvotes: 2