1

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 Answer 1

2

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"))
    ],
  ),
);
}
Sign up to request clarification or add additional context in comments.

3 Comments

you can search all that up flutter.dev/docs/development/ui/widgets at this link.
Hi, How can I add background colors
Add decoration property then color into it

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.