How to populate custom widget items into listview in flutter?

Viewed 6249

enter image description here

I want to create listview like this image. How can I achieve this using flutter?

Please do a favour if you know how to make it?

1 Answers

You need a List view widget and with builder which contains a card widget which has Row as child.

ListView :-

ListView.builder(
        padding: EdgeInsets.all(10.0),
        shrinkWrap: false,
        itemCount: model.length,
        itemBuilder: (BuildContext context, int index) {
          return listItem(context, index);
        },

List item :-

model is removed

Widget listItem(BuildContext context, int index) {
  return Card(
  child: Row(
    children: <Widget>[

      Container(margin: EdgeInsets.all(10),child: Text("1")),
      Container(height: 20,width: 1,color: Colors.blue,),
      Container(margin:EdgeInsets.all(10),child: Text("asdasd"))
    ],
  ),
);
}
Related